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

Re: Unspecified order of evaluation in Scheme



> Date: Fri, 23 Sep 1994 10:37:52 -0400
> From: myra@saul.cis.upenn.edu (Myra VanInwegen)
> Posted-Date: Fri, 23 Sep 1994 10:37:52 -0400
> To: wand@ccs.neu.edu
> Subject: Unspecified order of evaluation in Scheme

> Hello-

> Reading the R^4 report on Scheme, the TexInfo version, I find on page
> 15:

> 	Note: Although the order of evaluation is otherwise unspecied ...
> 	The order of evaluation may be chosen differently for each procedure
> 	call.

> Can the order of evaluation be chosen differently for different
> executions of the *same* procedure call? In other words, is Scheme
> non-deterministic?

> -Myra VanInwegen
> myra@saul.cis.upenn.edu

My copy says:

     *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.

     *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.

I'm sure this has been discussed many times, but I forget the answer.

I would read the phrase "the operator expression and the operand expressions
are always evaluated with the same evaluation rules" as precluding the
possibility that different executions of the same procedure call have
different orders of evaluation.

But I defer to the language lawyers on these issues.  Gentlemen, can you
refresh my memory?

--Mitch