views:

198

answers:

2

In the past LISP was the only powerful functional programming language, as far as I understand. Now there are lots, why do people still use LISP with its weird syntax? Is there a unique killer-feature of a kind?

+8  A: 

First, Lisp in general and Common Lisp in particular is more "multi-paradigm" than "functional". From here on, I will mostly discuss Common Lisp (CL).

There isn't "one killer feature", though. CL is a programmable programming language, making it easy to do meta-programming. That is, you can usually do "meta-level" things directly in the language instead of having to reach for a pre-processor that does textual transformation into your base language.

CL also has a very powerful object subsystem (CLOS), that has, so far, supported anything I've wanted to do with class hierarchies and/or methods.

As far as the syntax goes, I guess it's a bit different from the more classic syntax of the "Algol family" languages, but it's no more and possibly less weird than APL.

Vatine
+5  A: 

There is a unique killer-feature. It's called a macro-system. With macros you can expand your language and it makes it really easy to make great DSLs. This kind of thing would be hard (and not that nice) to implement with Scala, Erlang or Haskell.

The syntax or the lack of it is what lot of lispers really like because it brings a great uniformity which is something that is lacking in a lot of languages. For a standard C or Java programmer the Erlang or Haskell syntax is weird too so what's worse about syntax other that it looks weird.

Another question you should answer is why are the other languages better then Lisp, what feature is Lisp missing?

But it's of course the case that many modern languages learn a lot from Lisp and there are many more languages that can be used for the same problem.

Don't forget that Lisp is not one language there are diffrent kind of Lisp dialects. Scheme, Common Lisp or Clojure and all have diffrent focuses.

So the question what language to use can only be answered by trying them every has something pretty special about them. Erlang with the Actors, Haskell and Scala have these crazy typesystems, Lisps have awesome macro-systems .....

nickik