Chapter 4

Program Control

Order of Execution

Order of execution is defined for the constituents within a body. With some exceptions noted below, this execution order is left-to-right.

Definitions form the overall structure of a program and are not said to execute. In particular, module bindings are not created in any order, but all exist when program execution commences. To the extent that these bindings must be initialized by the values of some expressions that cannot be analyzed at compile time, references to the bindings are constrained by the execution order of the expressions within the surrounding body.

Dylan implementations are encouraged to allow forward references to module bindings whenever possible.

The order of execution of the components of a call to a user-defined macro is determined by the macro.

Execution Order Within Expressions

In general, execution within an expression proceeds left-to-right. The chief exception to this rule is the assignment operator, which is executed right-to-left.