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

EuLisp



Since you ask about the NIL business, the dual identity of NIL as both a
symbol and a list, and the business about CAR and CDR of NIL being legal
(both evaluate to NIL), this is a useful but terribly ugly hack.  It is
useful because you can use lists as data structures and access, for
example, the CADDR of a list, even if that list has been truncated and
has no CADDR under the old rules.  The problem is that once people start
using this hack, it is very hard to fix up their code not to use it.
You never are sure that you've found all the places where the assumption
comes into play.  

The feature first appeared in Interlisp, I think.  It was adopted in
Maclisp sometime in the mid-70's so that Interlisp code could be
imported more easily, and the convention speard from there onto the Lisp
machine (though there was a switch on the Lisp Machine to disable this
feature).

We debated for many months whether to get rid of this overloading of NIL
and to split up the concepts of NIL and the empty list into separate
items.  This was one of the few decisions that almost tore the Common
Lisp effort apart.  Finally, we decided that we would go with the status
quo in Maclisp, ugly as it was, so that people moving old code to Common
Lisp would not be driven crazy by subtle bugs.  This was traumatic for
all of us -- the first of many victories of pragmatism over beauty.  I
doubt that a proposal to re-open this question would get very far; there
has been too much blood spilled on both sides of the issue.

-- Scott