Reserved word

This makes it easy for a programmer to notice unexpected use of a reserved word and/or failure to terminate a comment correctly.

A compiler can be faster, since it can quickly determine if a word is a keyword, without having to do a contextual analysis over the whole of an arbitrarily long statement.

A programming language may be difficult for new users to learn because of a (possibly long) list of reserved words to memorize which can't be used as identifiers.

The frequent use of a double underscores in internal identifiers in Python gave rise to the abbreviation dunder; this was coined by Mark Jackson[3] and independently by Tim Hochberg,[4] within minutes of each other, both in reply to the same question in 2002.

Generally one wishes to minimize the number of reserved words, to avoid restricting valid identifier names.

For example, a procedural language may anticipate adding object-oriented capabilities in a future version or some dialect, at which point one might add keywords like class or object.

For example, there was a proposal in 1999 to add C++-like const to the language, which was possible using the const word, since it was reserved but currently unused; however, this proposal was rejected – notably because even though adding the feature would not break any existing programs, using it in the standard library (notably in collections) would break compatibility.

[7] JavaScript also contains a number of reserved words without special functionality; the exact list varies by version and mode.

For example, a Visual Basic (.NET) library may contain a class definition such as: If this is compiled and distributed as part of a toolbox, a C# programmer, wishing to define a variable of type "this" would encounter a problem: 'this' is a reserved word in C#.

Thus, the following will not compile in C#: A similar issue arises when accessing members, overriding virtual methods, and identifying namespaces.