guile-devel
[Top][All Lists]
Advanced

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

Re: truth of %nil


From: Neil Jerram
Subject: Re: truth of %nil
Date: Tue, 30 Jun 2009 23:22:32 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Andy Wingo <address@hidden> writes:

> 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

I'm sorry... you're completely right.  Brain storm on my part.

But then I don't understand the cause of your suggestion.  Is it that
master has somehow regressed, so as to cause (if %nil 1 2) => 1 ?

     Neil




reply via email to

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