[plt-scheme] Please help test version 359.100

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Nov 14 10:56:05 EST 2006

At Tue, 14 Nov 2006 16:33:49 +0100 (CET), hufflen jean-michel wrote:
> >From plt-scheme-bounces at list.cs.brown.edu  Tue Nov 14 13:55:51 2006
> >(...)
> 
> >> I don't think this is relevant. The true question is whether
> >>
> >>   (+ (for-each add1 '()) (for-each sub1 '()))
> >>
> >> steps to
> >>
> >>   (+ some-value some-value)
> >>
> >> or to
> >>
> >>   (+ some-value some-different-value)
> 
>    Since the value returned by "for-each" is left unspecified

But it isn't left unspecified. It is specified to be the specified
thing that the r5 report just calls "unspecified". (how confusing is
that?!)


> some
> implementations may choose to return zero value.  So does MIT Scheme:
> 
> 1 ]=> (for-each (lambda (x) x) '(1 2 3))
> 
> ;No value
> 
>    I suppose that this effect results from the "(values)" expression.  If we
> admit this, the second point is how to compare expressions resulting from the
> "values" function.  In MIT Scheme, the equality functions already return
> false:
> 
> (eq? (values) (values))    ====> #f
> (equal? (values) (values)) ====> #f
> 
>    So it seems to me that unspecified values cannot be compared or composed
> w.r.t. a portable way.

You can only admit this, as Jacob points out, if you have coercians for
multiple values to allow them to work in single value contexts.

Robby


Posted on the users mailing list.