Hacker News new | ask | show | jobs
by WalterBright 347 days ago
Pedantically, the preprocessor is an entirely separate language. The lexing, parsing, expressions, and semantics are totally distinct. The preprocessor is usually implemented as a completely independent program. My first C compiler did integrate the preprocessor with the C compiler, but that was for performance reasons.

Currently, ImportC runs cpp and then lexes/parses the resulting C code for use in D.

1 comments

It is part of the C standard. Whether it is part of a separate binary is an implementation choice.
True on both counts. But they are still separate and distinct languages.
C is a composition of what you describe as separate languages. They are both parts of C. That is why we call unpreprocessed code C code.