[Next] [Previous] [Up] [Top] [Contents] [Index]

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. This feature can only be used for operators which provide a shorthand for a function call. It cannot be used for special operators.

Function Call Shorthand

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

In all cases, the syntax is equivalent to using the name of the function in the current environment. The syntax does not automatically refer to a binding in the Dylan module.


Dylan Reference Manual - 17 OCT 1995
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker