Questions tagged [keywords]
For questions about keywords, which are tokens with special meanings in a programming language.
6
questions
21
votes
14
answers
4k
views
Preserving backwards compatibility when adding new keywords
Inspired by Why do keywords have to be reserved words?
Suppose that you're the BDFL of a programming language. Version 1 of the language becomes decently popular. A few years later, you decide to ...
26
votes
9
answers
6k
views
Are there good reasons to minimize the number of keywords in a language?
Are there good reasons to attempt to keep the number of keywords/reserved tokens in a language to a minimum? Such as by repurposing existing keywords for new syntax instead of adding new ones. Related:...
10
votes
7
answers
4k
views
Why do keywords have to be reserved words?
In many languages, the authors are hesitant to add more keywords, because doing so would break any existing code that happens to use those keywords as identifiers. However, they could do what C is ...
10
votes
3
answers
532
views
How do language designers determine what feature flags are part of the standard library and what are part of syntax?
Java has the @Override annotation. This annotation, when applied on a method, basically says that this method is intended to be an override of a superclass method. ...
8
votes
5
answers
981
views
Are there any reasons not to have built-in constants?
As of C17 there are no built-in constants. To use true false NULL or similar one must ...
8
votes
2
answers
227
views
How to correctly highlight contextual keywords?
Contextual keywords are tokens that are keywords in some contexts, and identifiers in others. Consider this example, which SE's highlighter gets wrong:
...