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

Re: mathematical models



I always understood the motivation for leaving argument evaluation order
unspecified to be the desire to allow parallel argument evaluation, not the
desire to allow optimizaion by reordering. But parallel argument evaluation is
even weaker than unspecified argument evaluation order. Under parallel
argument evaulation, the following expression

(let ((x 0))
 (+ (begin (if (zero? x) (set! x 1)) x)
    (begin (if (zero? x) (set! x 2)) x)))

could yield 3 which it could not do under any unspecified (applicative)
argument evaluation order, even one that allowed each call from a given call
site to have different argument evaluation order.

Mind you, I agree with Henry that it is better to specify argument evaluation
order and require the compiler to determine when it is safe to evaluation
arguments in parallel. I'm just pointing out one possible interpretation for
the motivation behind the current wording.

    Jeff (http://www.neci.nj.nec.com/homepages/qobi.html)