[plt-scheme] V4 request for thoughts on various question

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Aug 4 11:47:35 EDT 2008

On Mon, Aug 4, 2008 at 10:16 AM, Alan Watson <alan at alan-watson.org> wrote:
>>> The fact that let allow paralell bindings, do some folks take that
>>> fact and perform optimizations on multiple cpu boxes? Is it worth
>>> it?
>> The values are parallel, but the computation is not.  It's easy to
>> confuse the two, but it's a mistake.
> MPSCM[1] has a parallel let form.
> Eli, can you point me to language in the R5RS or R6RS that forbids
> interleaving the evaluation of the initializers in a standard let form? The
> R6RS just says, "The <init>s are evaluated in the current environment (in
> some unspecified order)". I think that allows the evaluation of the
> initializers to be interleaved or parallelized.

The constraint is on the values produced, not on the evaluation order
per se. Specifically, this:

(define q 0)
(let ([x (begin (set! q (+ q 1)) 1)]
      [y (begin (set! q (- q 1)) 1)])

must evaluate to 0, not -1 or +1.


Posted on the users mailing list.