[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Order of evaluation within applications



In Scheme's folklore, programs whose results depend on the order of
evaluation are illegal programs. Oddly enough, the Scheme report does
{\it not\/} mention such a restriction. The only quote relevant to the
subject is (p.8):

	Note: In contrast to other dialects of Lisp, the order of
	      evaluation is unspecified ...

As is, the quote is ambiguous and has the following two valid
interpretations:

1. The order of evaluation is unspecified EVEN if the expression
yields different answers under different orders. Any answer is an
acceptable answer.

2. An expression is a program ONLY when the value of the program is
not sensitive to the order of evaluation. That implies that divergence
under one order and an answer under another order are ok. 

I am wondering what the *official* position of the Scheme report is?
Any ideas? 

--Amr