[r6rs-discuss] Implicit parallel Scheme

Peter Bex Peter.Bex at xs4all.nl
Sun Sep 6 11:44:03 EDT 2009


On Sun, Sep 06, 2009 at 08:30:52AM -0700, Ray Dillinger wrote:
> On Sat, 2009-09-05 at 23:28 -1000, Shiro Kawai wrote:
> > Just a comment on concurrent evaluation of test exprs in cond:
> ...
> > 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) ...])
> 
> If any of those things changes, a *lot* of code, probably 
> almost *all* code, will break.  Now, it wouldn't be the first 
> time that a standards body has made a change that invalidated 
> all programs written before that standard *cough*R6RS*cough*, 
> but the code in this case would be a heck of a lot harder to 
> fix.

It's unfortunate that let* is a sequential variant of let. If the
meanings were swapped, we could simply add a cond* (and*, or*, if*?)
which made no guarantees about argument order.

I agree that almost all code will break if the meaning of cond is
changed.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 478 bytes
Desc: not available
Url : http://lists.r6rs.org/pipermail/r6rs-discuss/attachments/20090906/dc3556fe/attachment.pgp 


More information about the r6rs-discuss mailing list