Andy Wingo <wi...@pobox.com> writes:

> Hi all,
>
> Daniel came up with an interesting test case:
>
>     scheme@(guile-user)> (if %nil 1 2)
>     1
>
> We could fix this transparently by changing scm_is_false in boolean.h
> from:
>
>     #define scm_is_false(x) scm_is_eq ((x), SCM_BOOL_F)
>
> to
>
>     #define scm_is_false(x) (scm_is_eq ((x), SCM_BOOL_F) || SCM_NILP (x))
>
> I'm not really sure if this is the right place for this to go, though.
> It seems that it is. (Ideally the two values would differ by one bit
> only, and we could mask that bit away and just have the one test.) What
> do people think?
>
> Andy
> -- 
> http://wingolog.org/

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

     Neil


Reply via email to