guile-devel
[Top][All Lists]
Advanced

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

Re: truth of %nil


From: Andy Wingo
Subject: Re: truth of %nil
Date: Tue, 30 Jun 2009 00:11:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

On Mon 29 Jun 2009 23:44, Neil Jerram <address@hidden> writes:

> Andy Wingo <address@hidden> writes:
>
>>     scheme@(guile-user)> (if %nil 1 2)
>>     1
>>
>>     #define scm_is_false(x) (scm_is_eq ((x), SCM_BOOL_F) || SCM_NILP (x))

> Seems wrong to me.  In Scheme #f should be the only false value.
> What's the argument for %nil being false in Scheme code?

I thought the original plan regarding %nil and #f and '() was that %nil
wasn't supposed to be seen normally from Scheme, and for that reason
(and (null? %nil) (not %nil)) would not be a problem.

Guile has treated %nil as false for quite some time:

    scheme@(guile-user)> ,o interp #t
    scheme@(guile-user)> (if %nil 1 2)
    $1 = 2

Andy
-- 
http://wingolog.org/




reply via email to

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