guile-devel
[Top][All Lists]
Advanced

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

Re: JACAL, scm


From: Tom Lord
Subject: Re: JACAL, scm
Date: Mon, 24 Sep 2001 22:04:06 -0700 (PDT)

       > The '()/#f equivalence was dropped a long time ago.

It's not too late to fix that.

 * There are two values which are called booleans, written:
 * 
 *      `#t'    ;; used to represent "true"
 *      `()'    ;; used to represent "false"
 *      `#f'    ;; another way to write "false"
 * 
 * Only one value in the system, `()', represents "false".  All other
 * values, including `#t', are interpreted as "true".  `#f' is just
 * another way to write `()'.
 * 
 * In the text of a program, `()' typically represents ``nil'' or
 * ``nothing'', ``emptiness'', ``void''.  `()' is commonly used to
 * represent ``the empty list'', though it has other uses as well.
 * 
 * In standard Scheme, as contrasted with Systas Scheme, `()' is
 * different from `#f'.  They aren't `eq?'  or even `equal?'.  In
 * fact, `()' is a ``true'' value.  Fortunately, standard Scheme
 * hasn't always been that way, and it is commonly accepted as good
 * practice not to rely on `()' being different from `#f'.
 * 
 * In Systas Scheme, and the Systas Scheme libraries, we go ahead and assume
 * that `()' and `#f' are the same.  This makes a lot of programs just
 * a little bit simpler, and we have yet to see any significant disadvantage.
 * It means we have an easier time exchanging data with Emacs lisp.
 * 
 * A few times we've asked some RnRS authors why '()' and '#f' need to be
 * different.  In each case they mumbled something unconvincing about 
 * compilation and type checking, then quickly changed the topic.
 * Hosers.
 * 
 * We have a handy mnemonic for remembering the situation with `()' and `#f'
 * in Systas Scheme:
 * 
 *              In Systas Scheme, nothing is false.


-t



reply via email to

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