[r6rs-discuss] Implicit parallel Scheme

Shiro Kawai shiro at lava.net
Sun Sep 6 05:28:56 EDT 2009


Just a comment on concurrent evaluation of test exprs in cond:

From: Antonio Vieiro <antonio.vieiro at gmail.com>
Subject: [r6rs-discuss] Implicit parallel Scheme (was Re: Parallel-Scheme [was: Thoughts on Scheme's Future])
Date: Sun, 06 Sep 2009 11:16:19 +0200

> (That doesn't allow concurrent evaluation of test expressions)
> 
> That could be rephrased as:
>
> "A cond expression is evaluated by evaluating the test expressions in 
> some unspecified order. For the first test expression that evaluates to 
> true, the remaining..."
> 
> (Or something similar, that allows concurrent evaluation of test 
> expressions, but that imposes that the first one evaluating to true, if 
> any, is the one selected for the remaining stuff).

Doesn't that prohibit typical idioms in which the tests assume 
precedent tests are not satisfied?  For example, the following
code assumes when (odd? x) is evaluated x is an integer.  If we
allow concurrent evaluation, (odd? x) may signals an error.

(cond
  [(not (integer? x)) ...]
  [(odd? x) ...])

--shiro





More information about the r6rs-discuss mailing list