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: Josef Wolf
Subject: Re: Need help to understand a macro
Date: Mon, 22 Mar 2010 21:54:38 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Mar 22, 2010 at 09:16:34PM +0100, Andy Wingo wrote:
> Hi Josef,
> 
> I seem to be the negative guy in replies to you.

Uh? I did not notice anything negative?

> Apologies for that!

I don't see any reason for you to apologize...

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

As I understood this, the "no values" variant is a guile extension and not
guaranteed by the standard...

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

Even better would be "too few values for '+'" or something. Oh, and a line
number.




reply via email to

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