[plt-scheme] Please help test version 359.100

From: hufflen jean-michel (hufflen at lifc.univ-fcomte.fr)
Date: Tue Nov 14 12:11:41 EST 2006

>From matthias at ccs.neu.edu  Tue Nov 14 17:40:29 2006

>> At Tue, 14 Nov 2006 11:12:51 -0500, Dave Herman wrote:
>>>>>    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?!)

>Dave and I argue that an implementation can make up a new random value
>-- as long as it is a Scheme value -- and use it wherever the semantics 
>says unspecified.

>If you tried to say the same thing, your English comprehension is
>very different from mine.

   I do not know if I am badly influenced by misunderstanding English but here
is what I think:

   The notion of *unspecified value* is ambiguous. It may be:
   - any value, possibly chosen randomly,
   - no value, or (why not?) several values as Scheme functions may return
multiple values.

   There is no way in R5RS to handle with unspecified result, neither
predicate "unspecified?" comparable with the "pair?" function, for example,
nor equality function dealing with such a result.  So, unspecified values can
be produced but cannot be consumed.  If we consider again the example with

(define kludge-value (for-each ... ...))

this expression may or may not cause an error.  So does:

(eq? (for-each ... ...) ...)

If we prefer to write portable code, we should avoid it.

   All the best,


Posted on the users mailing list.