Evaluation is always separated between procedure calls though, so the
undefined order only regards specifically the order in which the operator
and arguments are evaluated, right?
(
E.g.:
For the code (A (B C D) (E F G)), let's call (B C D) X1 and (E F G) X2,
here: While the evaluation order within the block B C D, and within the
block E F G, and within the block A X1 X2, is undefined, the internal
evaluation of X1 and X2 is never mixed so that you'd get an evaluation
order B to F to D, right?
Any mix where A, X1, X2 are kept separate could happen thoug, e.g. A, C, B,
D, F, E, G or F, E, G, D, B, C, A.
)
Left as an exercice to the readerâŠ
Marc
Wow.
Can you give an actual code exampe where compiled (or interpreted) code
not does left to right?
I think all I observed in practice in the past was left to right.
Adam
Execution order is arbitrary. The interpreter and compiler donât use
the same ordering. The interpreter tends to be mostly left-to-right, but
donât count on it.
Marc
Hi Marc!
Does Gambit evaluate left-to-right order always or only generally?
Thanks,
Adam