Re: #f vs. '() vs. nil

F Puech (puech@limeil.cea.fr)
Tue, 10 Sep 1996 16:47:56 --100

on Fri, 6 Sep, Petr Adamek <adamek@merton.mit.edu> write:

>
> I believe that the last sentence is not entirely correct. It is
> effectively UNSPECIFIED, whether or not the empty list is the false
> object or not. I recall Dr. Wilson pointing this out already some
> time ago. Please see the excerpts from R4RS enclosed for easy
> reference below.

[ SNIP ]

> EXCERPT FROM R4RS
>
> [from r4rs/procs.tex:]
>
> \section{Booleans}
> \label{booleansection}
>

[ SNIP ]

> \vest Of all the standard Scheme values, only \schfalse{}
> % is guaranteed to count
> counts as false in conditional expressions.
> % It is not
> % specified whether the empty list\index{empty list} counts as false
> % or as true in conditional expressions.
> Except for \schfalse{},
> % and possibly the empty list,
> all standard Scheme values, including \schtrue,
> pairs, the empty list, symbols, numbers, strings, vectors, and procedures,
> count as true.
>
[ MORE ]

AFAIK in TeX source everything from '%' to 'End-of-Line' is a comment, so
my reading of R4RS is :

... the empty list, ... count as true.

This also agrees with the abstract syntax (see IF and the truish utility)

so

> There may exist perfectly legal R4RS code running under a specific
> R4RS-compliant Scheme that assumes
>
> (eq? #f '()) ==> #t.

is probably not correct

(i agree that the section about differences from R3RS suggests that this
point should be unspecified. I see it at erroneous)