Posted: Mar 20, 2012 10:51 am
Interesting post, epepke. Just a few comments:

epepke wrote:Jumping in here.

I learned LISP in my first semester at MIT. LISP was the Big Deal there at the time (late 1970s), and that's what they taught the frosh (now I hear they use Python, which is very LISP-like but with syntax). I had already learned BASIC (with line numbers), COBOL, Tutor (later renamed PAL), and Z-80 assembly.

LISP was very badly taught at MIT.
That's a shame. I assume by the 80s, things had improved substantially with Structure and Interpretations of Computer Programs. The book is brilliant, at least.

All the examples had unnecessary PROGs all over the place. The first example of recursion they gave was the Fibonacci sequence, which is bad, because the iterative solution is so obvious and obviously better.
Oh, I dunno. Once you have laziness, I think the recursive solution is stunning. If you take two copies of the Fibonacci sequence, chopping off the first element of one, you get:

1, 1, 2, 3, 5, 8, 13, ...
1, 2, 3, 5, 8, 13, 21, ...

Now if you apply addition vertically, you obviously get the Fibonacci sequence with two elements chopped off the front. In other words:

Code: Select all
`fibs = 1 : 1 : zipWith (+) fibs (tail fibs)`

Note that the way graph reduction is performed in a lazy language means that evaluation here has the same complexity as the iterative solution.

LISP is extremely beautiful. Common LISP, however, has so much stuff in it that it strikes me as extremely unwieldy. I cannot remember who, but somebody said that every significant implementation contains a bug-ridden implementation of about half of Common LISP. I think this is true. The internal ideas of LISP and the way it handles memory are quite good, and even in programs in C and C++, it makes a lot of sense to write something like LISP internally.
Is there really just one LISP? I read a series of early articles in the History of Programming Languages on this, and my understanding was that there were many dialects around for decades before CL.