[plt-scheme] Please help test version 359.100

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

>From hufflen at lifc.univ-fcomte.fr  Tue Nov 14 18:11:42 2006
>(...)

>   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.

   After checking, the situation is more ambiguous than I was thinking. Let us
consider:

[0] (for-each write '())
[1] (define checking-for-each (for-each write '()))
[2] (define checking-zero-value (values))
[3] checking-for-each
[4] checking-zero-value
[5] (eq? checking-for-each (for-each write '()))

   PLT accepts [0], [1], but not [2], although [0] and [1] do not result in a
value. [3] yields the same as [1], that is, no value. [5] yields "#t".  That
is, unspecified values sometimes behave like a single value, even if there are
no such.

   MIT Scheme accepts all, [1] and [2] result in the symbol you are defining,
[0] and [3] yield no value, [4] results in a closure, [5] results in "#t".

   bigloo accepts all, [1] and [2] result in the symbole you are defining, the
other cases of unspecified values are modelled by a unique one, built by a
zero-argument function "unspecified".  There is no predicate for catching
this unspecified value. [5} returns "#t". [4] results in 0 (zero!)

   Maybe there is somewhere in R5RS the fact that unspecified values cannot be
multiple, but in practice, some interpreters return zero value in such a case.
This makes this notion of unspecified value more obscure.  Unless we accept to
never consume it, as I said previously.

   All the best,

				J.-M.


Posted on the users mailing list.