On Sep 11, 2009, at 6:46 PM, John Cowan wrote: > Andrew Pochinsky scripsit: > >> Note: In contrast to other dialects of Lisp, the order of >> evaluation >> is unspecified, and the operator expression and the operand >> expressions are always evaluated with the same evaluation rules. > > You've misinterpreted this language. It sets Scheme off from other > Lisps > that treat the operator and its operands differently. For example, > in Common Lisp the operator must be either a literal function name or > an explicit lambda; it cannot be an ordinary variable name, a function > call, or any other sort of expression. (If you need to call a > function > not known at compile time, you use the FUNCALL function.) > > So what is meant is "The operator expression is always evaluated with > the same evaluation rules as the operand expressions.
If one takes a position that RnRS alone defines the language, then it could only mean what it says, not the other way around. It seems a rather unfortunate state that there are several places in RnRS that require a language lawyer well steeped in the history of functional programming to parse. >> Note: Although the order of evaluation is otherwise unspecified, >> the >> effect of any concurrent evaluation of the operator and operand >> expressions is constrained to be consistent with some sequential >> order >> of evaluation. The order of evaluation may be chosen differently for >> each procedure call. > > That means that evaluation of the expressions cannot be interleaved. The last sentence is relevant to the present discussion. What application forms are "the same"? One can take a point of view that each lexically distinct application expression is "the same" and has a fixed order of evaluation of the procedure and arguments. Or one can consider a procedure call to be a dynamical thingie that happens at most once in the life time of the program. Modulo history of Lisp and Scheme, RnRS does not favor one approach over the other. --adnrew _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
