top | item 34035582

(no title)

costigan | 3 years ago

> NIL is an empty list.... It isn't. It has none of the mechanics of an empty list in Python etc.

I can see how NIL is confusing when coming from Python, but I think this comment has it backwards. The idea of lists as chains or trees of pointers with a distinguished termination value predates LISP by a few years. Moreover, this kind of list predates Python's use of the term by more than 35 years. If you treat lists as just a particularly useful subclass of trees of CONS cells, then they and NIL make perfect sense. Python's lists are fine too, they're just a different kind of thing.

discuss

order

No comments yet.