[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] "unspecified values"
On Thu 19 May 2011 18:10, Alaric Snell-Pym <alaric@x> writes:
> On 05/19/11 16:49, Andy Wingo wrote:
>> Suggestion: replace every instance of "an unspecified value", "value is
>> unspecified", "result is unspecified" and the like with "unspecified
>> values". This would permit the elegant approach of defining control
>> constructs with no logical value to return 0 values. This follows the
>> R6RS.
>
> I was keen to do away with the strange dependence on precisely one value
> that was not specified, but it was voted to stick with a single
> undefined value being returned from things!
>
> See #68 at http://trac.sacrideo.us/wg/wiki/WG1Ballot2Results
Unfortunate.
I do not agree with the note that permitting any number of values to be
returned from `set!' et al is incompatible. It is not incompatible with
implementations, as it widens the scope of what they may do. It is not
incompatible with existing programs, as I do not expect existing
implementations to switch -- most will do what they have been doing.
The incompatibility would be for old programs that expect `set!' et al
to return a value -- I argue that these are incorrect programs -- *but
only running on those few implementations that would change*.
So basically an implementation chooses whether it wants the elegance or
the compatibility. That's a fine choice for an implementation to make,
and it does not need to be prescribed by the standard. In the mean time
migrating programmers off of the idea that `set!' produces a portable,
single value is a good thing.
Andy
--
http://wingolog.org/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports