On Mon 29 Jun 2009 23:44, Neil Jerram <n...@ossau.uklinux.net> writes:

> Andy Wingo <wi...@pobox.com> 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