[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] strange language in spec of `and' and `or'



On Thu, 19 May 2011 17:19:17 -0400, Andy Wingo <wingo@x> wrote:

> On Thu 19 May 2011 18:51, Alex Shinn <alexshinn@x> writes:
>
>> On Thu, May 19, 2011 at 8:55 AM, Andy Wingo <wingo@x> wrote:
>>> Section 4.2.1, p. 11, in the spec of `and':
>>>
>>>  "The TEST expressions are evaluated from left to right, and the value
>>>  of the first expression that evaluates to a false value (see section
>>>  6.3.1) is returned.  Any remaining expressions are not evaluated.  If
>>>  all the expressions evaluate to true values, the value of the last
>>>  expression is returned..."
>>>
>>> Why these weasel words?  Is this to somehow permit implementations with
>>> more than one false value to return a false value from `and' which is
>>> not #f ?
>>
>> Good point, that's possibly wording left over from
>> R4RS, where #f and '() were not necessarily distinct.
>>
>> #f and '() could be distinct and yet there could be
>> other false values (as in Guile, no?), but I'm not
>> sure if we need to word the standard to accomodate
>> such extensions.
>
> Yes Guile does have a #nil which is false; but in this case the report
> seems to be over-specifying (i.e. (and #nil #t) returning #nil instead
> of #f).
>
> Dunno.  My suggestion would be to worry about Scheme; people with a
> "nil" in their language have other problems ;-)

I suggest we take up the R6RS wording in this regard, which is rather  
clear. Filed ticket #188.

	Aaron W. Hsu

-- 
Programming is just another word for the lost art of thinking.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports