guile-user
[Top][All Lists]
Advanced

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

Re: Need help to understand a macro


From: Andy Wingo
Subject: Re: Need help to understand a macro
Date: Mon, 22 Mar 2010 21:16:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi Josef,

I seem to be the negative guy in replies to you. Apologies for that!

On Mon 22 Mar 2010 20:25, Josef Wolf <address@hidden> writes:

> On Fri, Mar 19, 2010 at 08:54:02AM -0400, Ken Raeburn wrote:
>> 
>> The result of (if #f #f) is unspecified, not #f, according to r5rs.
>> That means an implementation can produce whatever value it wants.

In the R6RS, evaluating `(if #f #f)' returns "unspecified values" --
that is, even the number of values is unspecified. And in fact it would
make sense for `(if #f #f)' to be the same as `(values)' -- an
expression returning zero values.

> I think I like this type of "unspecified". Much better than the
> "undefined behavior" definition in C.

Unfortunately it really is unspecified :) OK it's better than C, in the
sense that it won't launch the missiles, but it would be better if
evaluating:

   (+ 2 (if #f #f))

yielded an error of "too few values to continuation" rather than "don't
know how to add #<unspecified>".

Cheers,

Andy
-- 
http://wingolog.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]