space_raptor wrote:I have no experience with LISP. Anyone care to briefly summarize why it's so good?
LISP belongs to the family of languages known as "functional".
The idea of a functional language is it consists of functions that take arguements and return results. The genius is that the functions, by default, don't have side effects.
If a function doesn't have side effects, then if you evaluate the same function more than once on the same arguements, you should be guaranteed to get exactly the same answer.
A LISP program is a function that is evaluated.
In comparison, a procedural language is about statements that change the machine state. Nearly every statement modifies some external state (ie, x=5; changes the value stored in x), and your program tries to describe what steps need to be taken to solve the problem.
The rules that bind a LISP function are important -- because the result of a pure functional function call are determined only by the arguements, you can cache the results of
every pure functional function. Not only that, because the results don't depend on anything except the arguements, you can parallelize any two function calls that aren't feeding their result into each other.
Doing this in procedural languages is considered hard enough that modern compiler writers don't do it. The closest I've seen is pragma preprocessing directives -- and they essentially explicitly tell the compiler exactly what kinds of cacheing and parallelization can be done.
...
Now don't get me wrong. That isn't the only reason why functional languages are cool. For one thing, LISP isn't purely functional.
So what else is cool about LISP in particular?
LISP is a list processor. Everything is a list, or a list of lists, or a list of lists of lists. Well, actually everything is a binary tree which is usually interpited as a list.
The LISP engine interprits your code. It is quite common to write interpriters that run in the LISP engine and interprit other lists -- and LISP is designed so that this works.
LISP doesn't "natively" support iteration. Instead, tail-end recursion is done, and the compiler is smart enough to optimize it out.
...
Note that some of the above claims about LISP may be about some varient of Scheme. It has been a while, and I may have mixed up features of the two languages.
In short: LISP is cool because it is an example of one of the 3 fundamental ways to program a computer effectively (declariative, procedural and functional). LISP is cool because it is a list processing language, and language-symbols can be manipulated within the language itself. LISP is cool because it descends from a nigh-assembly language on the PDP-11, an early computer -- it is a functional assembly! LISP is cool because it contains many ideas that can be used to make other programming languages infintely more powerful.
And finally LISP is cool because it makes you think about programming differently than many other languages. If you haven't written a program in make/prolog, C++/Java, and Haskall/LISP (3 categories, each with a pair of examples) you probably have a really slanted idea about what programming can be about.
Finally, LISP is cool because it stands for Lost In Several Parethesis, which describes debugging the code. :)