3 ms·
> It's as if they go around looking for places in the grammar they can unambiguously stick "static" and then back-rationalize a meaning for it. I would think t
by derefr 8y ago
> It's as if they go around looking for places in the grammar they can unambiguously stick "static" and then back-rationalize a meaning for it.
I would think that that's exactly what they do, in order to avoid breaking existing code by introducing any more reserved words.
- coldtea 8y agoIf only they'd thought of using a special prefix for reserved words, e.g. _.
- gaius 8y agoThose are the words that are part of the language itself! The _ prefix is used for variables.
- coldtea 8y agoI know. I mean if they differentiated keywords like static with _ (and didn't allow it as a variable prefix) then they could have an infinite number on non-clashing language keywords...
- int_19h 8y agoThat's exactly how it works for all new (from C99 onward) keywords. The actual keywords are defined with a leading underscore and a capital letter. The standard reserves all such identifiers for implementation, and so no valid conforming program should contain any such. Thus, you get keywords like _Bool and _Complex. And then, to make them look nice, there are headers like <stdbool.h> which basically just do #define bool _Bool etc.