Keywords
Keywords are reserved tokens whose role in the language is defined in the language specification. They may not be used as identifiers.
Usage
Usage depends on the keyword in question.
Description
The following are reserved worlds:
abstracts(currently unused)adapts(currently unused)aliasassertassignbreakcasecatchclasscontinuedynamicelse(used with thefor,ifandswitchstatements and as an operator)exists(used withifand as an operator)extendsfinallyforfunctiongivenin(used for variance and with theforstatement and as an operator)interfaceis(used in theif,while, andcasestatements and as an operator)modulenonempty(used in theif,while, andcasestatements and as an operator)objectof(used withclassandinterfacedeclarations) and as an operator)outouterpackagereturnsatisfies(used inclassandinterfacedeclarations)superswitchthenthisthrowtryvaluevoidwhile
Quoting
It is possible to quote keywords, creating an identifier which would
otherwise be treated as keyword by the lexer. For example \iout creates an
identifier called out. The intended purpose of quoting for interoperability
with other platforms/languages. For example it may be necessary to invoke or
override a method called out on a class written in
Java (where out is not a keyword).
Annotations
Other identifiers commonly seen in declarations (such as shared) are not
keywords but annotations.
See also
- Identifiers and keywords in the Ceylon specification