[r6rs-discuss] [Formal] Inappropriate number of values should be defined

David Van Horn dvanhorn at cs.brandeis.edu
Mon Jan 22 11:28:21 EST 2007


John Cowan wrote:
> Marcin 'Qrczak' Kowalczyk scripsit:
> 
>> I would prefer to leave this undefined (detected as an error in safe mode)
>> *and* replace most uses of the unspecified value with zero values.
>> This allows to detect dubious code like:
>>    (let ((x (if y (z))))
>>      ...)
> 
> But then you can no longer write things like:
> 
>     (begin
>       (if (debug-mode?) (display "About to call foo\n"))
>       (foo))
> 
> because when debug-mode? returns false, the if will return zero values
> to the continuation created by begin.

But `begin' allows that expression to evaluate to zero or more values.

David



More information about the r6rs-discuss mailing list