What is the difference between Lisp-1 and Lisp-2?

appshare.co picture appshare.co · Jan 2, 2011 · Viewed 18.5k times · Source

I have tried to understand the difference between Lisp-1 and Lisp-2 and how this relates to Clojure but I still do not understand properly. Can anyone enlighten me?

Answer

Peter McLain picture Peter McLain · Jan 2, 2011

You might like to read this paper by Richard Gabriel. It is a summary of the issues that the Lisp community were discussing in Lisp1 vs Lisp2. It's a bit dense and slow moving in the first few sections, but is much easier to read by the time you get past section 5.

Basically, Lisp1 has a single environment that maps symbols to values, and those values can be either "regular" or functions. Lisp2 has (at least) two namespaces (symbols have a slot for their a function value and one for a regular value). So, in Lisp2, you can have a function named foo and a value named foo, whereas in Lisp1, the name foo can refer only to a single value (function or otherwise).

There are several tradeoffs and differences of taste between the two, but read the paper for the details. Christian Queinnec's book, "Lisp in Small Pieces" also has discussion of the differences woven through the text.