23 ms·
I don't think he did miss that, rather it simply wasn't on-topic for the article he was writing. Anybody who has used the C preprocessor knows it works at the l
by TheSoftwareGuy 6y ago
I don't think he did miss that, rather it simply wasn't on-topic for the article he was writing. Anybody who has used the C preprocessor knows it works at the level of text/tokens and no further. The fact that it knows nothing of types would hardly be "scandalous"
But you can go ahead and use this thread to promote D anyways.
- WalterBright 6y agoThe #if does more than just text and tokens, it has an expression grammar (constant-expression). It's implementation-defined whether the following two produce the same value: #if 'z' - 'a' == 25 if ('z' - 'a' == 25) Another difference is all constants are typed as intmax_t and uintmax_t, not the usual C types. Yes, it does have types. This difference in behavior from C expressions is not necessary.