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

Attachment: pgpO4mSYDGS9q.pgp
Description: PGP signature

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to