Why was C ++ referred to as a “usually” compiled language?

The C ++ wiki tag states that

C ++ is ... a (usually) compiled ... programming language ...

However, Wikipedia and cplusplus.com assert that C ++ is a compiled language without mentioning any exceptions.

Could you tell us why C ++ is usually , but not always , a compiled language? When can C ++ be considered a non-compiled language?


Wikipedia:

C ++ is a compiled language, with its implementations on many platforms.

cplusplus.com:

... is a compiled language. C ++ compiles directly into the native code of the machine, allowing

This may mean that there are no compiled forms of C ++. What makes a wiki indicate "usually"

+7
c ++
source share
4 answers

Because "C ++", as defined by the C ++ standard, is only a programming language that runs on an abstract machine. Implementations can do whatever they want to mimic the behavior of this abstract machine.

Therefore, regardless of whether someone really makes a C ++ interpreter, saying that C ++ is always compiled would be an unreasonable assumption.

+10
source share

There are no technical reasons why you cannot write a C ++ interpreter, not a compiler, and I believe that some of them were written in the past.

C is also a (usually) compiled language, but I myself wrote a (slow, recursive) C89 interpreter about 20 years ago. C ++ is just a (more) complicated version of the same problem.

+7
source share

There are some interpreters for C ++ subsets (a related question ), but the vast majority of C ++ work is done using compilers. The use of interpreters is so rare that no C ++ literature or a significant C ++ library or program, obviously not o / for these interpreters, is not limited to the subset of C ++ that can be used on the interpreter.

With C ++, it is actually more common to compile C ++ on the fly than to interpret any.

Whatever the cost, the most recent related news I read (on Hacker News ) was roughly C ++ 17 REPL .

+2
source share

In most cases, C ++ compiles, but, for example, cling is a C ++ interpreter. I haven’t tried very much, but it seems to be a pretty complete C ++ implementation.

+1
source share

All Articles