Table of Contents
Dylan identifiers may contain a greater variety of characters than those of C or Pascal. Specifically, variable names may contain all alphanumeric characters, plus the symbols ! & * < = > | ^ $ % @ _ - + ~ ? /. Identifiers may not begin with the symbols - + ~ ? /, although identifiers may begin with numbers, provided they contain at least two alphabetic characters in a row. As in Pascal, variable names are not case sensitive. Need Dylan Reference Manual footnote here.
This means that (a - b) subtracts one variable from another, whereas (a-b) simply returns the value of the hyphenated variable named a-b. Because of this, infix operators, such as addition, subtraction and equality, must be surrounded by whitespace.
As in C++, Dylan infix operators may also be refered to as functions. In C++, (a + b) could also be written as operator+(a, b). In Dylan, the same expression could be written \+(a, b). In both languages, programmers can use this flexibility to define operators for custom numeric classes.
Dylan uses the extra characters permitted in variable names to support a number of standard naming conventions, as shown in Table 2.1, “Naming Conventions”.