What's so great about Lisp?

Lisp

Lisp Problem Overview


I don't know enough Lisp to say whether it's good or bad. It seems like everyone who has used Lisp loves it, yet the most popular languages these days are descended from C.

So what is it about Lisp that is so great and why isn't it used more? Is there anything just plain bad about Lisp (other than the incessant amount of parentheses)?

Lisp Solutions


Solution 1 - Lisp

Lisp is good because it has a very minimal, simple, regular syntax.

Lisp is bad because it has a very minimal, simple, regular syntax.

Solution 2 - Lisp

> “Lisp is a programmable programming language.”
> — John Foderaro, CACM, September 1991

Here’s my view:

On the surface, Lisp is a nice, simple functional programming language. There’s almost no syntax, and all the pieces fit together in logical ways.

If you dig a little deeper, read SICP, and write a metacircular evaluator, you discover two things: One, the whole interpreter (given just a few primitives) is just barely a page of code, and two, the relationship between code and data allows for elegant programming techniques.

Once you’ve fully absorbed this, it feels like other languages are set in stone when they only allow you to say a few things. Lisp can build any abstraction at all if you can define syntax and semantics for it.

Solution 3 - Lisp

Lisp is the Chuck Norris of programming languages.

Lisp is the bar other languages are measured against.

Knowing Lisp demonstrates developer enlightenment.

I've heard of 3 weaknesses (and their counter-arguments):

  1. Dynamic typing.

There's an argument for statically typed languages out there revolving around giving the compiler enough information to catch a certain class of errors so they don't happen at runtime. But you still need to test.

This article argues for dynamic typing along with more testing: [Strong Typing vs. Strong Testing][1].

  1. Hard to pick up.

There are actually two parts to this: learning and tools.

Lisp takes some effort to really "get", but it's worth it, because learning Lisp really will make you a better programmer in other languages. For instance, once you really "get" closures, you'll understand Java's inner classes. And once you "get" first-class functions, you'll be depressed every time you use a language without them.

I've read The Little Schemer and am reading Practical Common Lisp, which are both excellent.

Next are the tools. I'm on a Mac, so I've zeroed in on [Aquamacs Emacs][2] (makes Emacs livable for a novice) and [Steel Bank Common Lisp][3] (SBCL).

  1. Lack of libraries.

I can't tell for sure yet, but I doubt it. For building web sites it looks like [Hunchentoot][4] and [Elephant][5] provide a good set of tools. But really I don't see Lispers complaining about the lack of libraries (maybe because Lisp is so powerful they just aren't needed?).

[1]: https://archive.is/sNiUC "Strong Typing vs. Strong Testing" [2]: http://aquamacs.org/ [3]: http://www.sbcl.org/platform-table.html [4]: https://edicl.github.io/hunchentoot/ [5]: https://www.common-lisp.net/project/elephant/doc/elephant.html

Solution 4 - Lisp

"Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp."

Greenspun's Tenth Rule

Solution 5 - Lisp

Here's some helpful links:

Solution 6 - Lisp

The first chapter of Peter Seibel's excellent Practical Common Lisp covers his reasons for liking Lisp. Bottom line is the phrase "programmable programming language" -- the ability to customise the language to your domain or preferred style.

Solution 7 - Lisp

> A Lisp program tends to provide a much clearer mapping between your > ideas about how the program works and the code you actually write.

Source: http://www.gigamonkeys.com/book/introduction-why-lisp.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDarrell BrogdonView Question on Stackoverflow
Solution 1 - LispDaniel EarwickerView Answer on Stackoverflow
Solution 2 - LispJosh LeeView Answer on Stackoverflow
Solution 3 - LisprickmodeView Answer on Stackoverflow
Solution 4 - LispPaoloView Answer on Stackoverflow
Solution 5 - LispGreg HewgillView Answer on Stackoverflow
Solution 6 - LispitowlsonView Answer on Stackoverflow
Solution 7 - LispketanView Answer on Stackoverflow