Skip to main content

Questions tagged [keywords]

For questions about keywords, which are tokens with special meanings in a programming language.

0 votes
2 answers
1k views

In most C-like languages, a call such as printf("%d", x) is followed by two parentheses; and I see that a statement such as ...
user avatar
17 votes
4 answers
3k views

C99 introduced the following keywords: _Bool _Complex _Imaginary ...
CPlus's user avatar
  • 10.5k
12 votes
4 answers
5k views

In Python we have the concept of a soft keyword, which makes some keywords reserved only in some special cases (e.g. match, case ...
Amir reza Riahi's user avatar
18 votes
7 answers
4k views

Across languages that use the word static as a keyword or reserved word, I have observed it to mean: "This variable, despite being declared locally, shall be ...
Karl Knechtel's user avatar
-4 votes
3 answers
348 views

I know most languages use bool or boolean but I do not really like that name seeing as it was named after a person and a highly ...
user1345541's user avatar
22 votes
14 answers
5k views

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 ...
dan04's user avatar
  • 2,394
10 votes
7 answers
5k views

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 ...
CPlus's user avatar
  • 10.5k
8 votes
5 answers
1k views

As of C17 there are no built-in constants. To use true false NULL or similar one must ...
CPlus's user avatar
  • 10.5k
26 votes
9 answers
6k views

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:...
CPlus's user avatar
  • 10.5k
11 votes
8 answers
4k views

A language that I use (M) has this nifty feature that allows you to abbreviate most keywords to a single letter. For instance, the following code: ...
Isaiah's user avatar
  • 807
8 votes
2 answers
393 views

Contextual keywords are tokens that are keywords in some contexts, and identifiers in others. Consider this example, which SE's highlighter gets wrong: ...
Bbrk24's user avatar
  • 9,672
14 votes
3 answers
926 views

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. ...
Seggan's user avatar
  • 3,412