@rzeta0 Basically, if you make lists out of conses, you can pick whatever object pretty arbitrarily to be your list terminator. Some early Lisp hackers thought it made a lot of sense to use the same thing to also represent Boolean false, and it kind of caught on, partly because of the algebraic convention that whatever thing behaves as one'd expect 0 or 1 to behave is often just denoted by '0' or '1'. But not all Lisp dialects do it the same way; Scheme, for one, makes a strict separation between ()
, the empty list, and #f
, the Boolean false.
Unifying the number 0 with the empty list sort of makes sense in an environment where your Lisp objects are transparent pointers, and the null pointer, having a value 0, lives in the same address space. In modern type-safe languages, transparent pointers are kind of shunned upon, but a couple decades ago, people were happy to call a computer safe if it didn't explode too often. Still, you might possibly see them in a hypothetical dialect of Lisp built around Forth; Forth is one of the few remaining languages whose culture doesn't worry too much about such transprencies. (Well, outside dialects like PostScript, anyway.)