Comment on page
The rules for identifiers in Dyvil are much more tolerant than in Java. Dyvil differentiates between two different types of identifiers:
Alphanumeric Identifiers are the identifiers made of lower- and uppercase letters and digits. They can also be built from Unicode characters.
The first character in an alphanumeric identifier must not be a digit.
Symbols Identifiers are, as the name suggests, made of mathematical or other (Unicode) symbols. In the language, they are usually used and interpreted as operators. It is possible to create symbol identifiers with period symbols
.in any position, but the symbol alone is not a valid identifier.
Alphanumeric and Symbols Identifiers cannot be directly combined without special symbols. For example, the text
Produces two separate identifier tokens,
*=. However, it is possible to create a single identifier that consists of both alphanumeric and mathematical symbols. This can be achieved by separating them with either an underscore
_or a dollar sign
The way in which the identifiers are used (qualified or unqualified) is not considered. A method named
$eq$eqcan also be called with the
==operator, because these two identifiers have the same underlying meaning. However, there may be differences in how expressions with these tokens are parsed.