Chapter 2

Syntax

Special Treatment of Names

Escaping Names

The escape character ( \ ) followed by any name or operator-name has the same meaning as that name or operator-name, except that it is stripped of special syntactic properties. If it would otherwise be a reserved word or operator, it is not recognized as such.

For example, \if and if are names for the same binding, but \if is treated syntactically as a named value reference, while if is the beginning of a statement. Similarly, \+ and + refer to the same binding, but the former is treated syntactically as a named value reference, and the latter as an operator.

For reserved words, this allows the names of statement macros to be exported and imported from modules. It does not allow them to be used as the names of local bindings, nor does it allow them to be executed. (That is, they cannot be used as bindings to runtime values.)

For operators, it allows the operator to be used where a named value reference is required, for example as the name in a method definition, as an argument to a function, or in a define module export clause.

Function Call Shorthand

Dylan provides convenient syntax for calling a number of functions. These include the operators, the array reference syntax, and the singleton syntax.

In all cases, the syntax is equivalent to a function call (which can be a function macro call) whose function is a named value reference to the name of the function in the current environment. The syntax does not automatically refer to a binding in the Dylan module.