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

T and NIL.

To give some perspective, the things to change in the existing NIL code
to support the T & NIL symbol overloading from lisp 1.5 are:
[1] Change the type code of the () object to be of type SYMBOL.
[2] Change every primitive which acts on symbols to have a
    special case check like (DEFUN PLIST (X) (%PLIST (SYMBOL-FILTER X))).
	     (IF (SYMBOLP X)
                 (SYMBOL-FILTER (WRONG-TYPE-ARG-ERROR "Not a symbol" X))))
    and %PLIST is the usual open-compiled stucture reference.
[3] Make the usual changes in the evaluator, special case for T and NIL.
[4] Make #T read in as T.
[5] Recompile and reassemble the world.

So you can see that it isn't all that much work, won't slow things
down too much (mainly the evaluator), and won't make things any bigger.
Larger changes, such as changing the calling sequence of most things
in the virtual machine, have been made in NIL in the recent past.

Remember though, this will be in lisp, and not hidden away in microcode,
so users will be able to see the funny stuff going on. It won't be
as if the semantics were built-in to the hardware or engraved on
stones brought down from a mountain top.

Obviously the other more localized way of changing this is to redefine
CAR and CDR to work on the symbol NIL. Totally out of the question
in a non-microcoded implementation.