As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

29 Answers
29

One of the main uses for Lisp is in Artificial Intelligence. A friend of mine at college took a graduate AI course and for his main project he wrote a "Lights Out" solver in Lisp. Multiple versions of his program utilized slightly different AI routines and testing on 40 or so computers yielded some pretty neat results (I wish it was online somewhere for me to link to, but I don't think it is).

Two semesters ago I used Scheme (a language based on Lisp) to write an interactive program that simulated Abbott and Costello's "Who's on First" routine. Input from the user was matched against some pretty complicated data structures (resembling maps in other languages, but much more flexible) to choose what an appropriate response would be. I also wrote a routine to solve a 3x3 slide puzzle (an algorithm which could easily be extended to larger slide puzzles).

In summary, learning Lisp (or Scheme) may not yield many practical applications beyond AI but it is an extremely valuable learning experience, as many others have stated. Programming in a functional language like Lisp will also help you think recursively (if you've had trouble with recursion in other languages, this could be a great help).

Why do you say Lisp is only good for AI? Also, it's a multi-paradigm language. Functional is only one of the several paradigms it enables.
–
Luís OliveiraSep 18 '08 at 8:48

5

I didn't say its only used for AI, I said one of its main uses is AI. Did you read it?
–
Justin BennettSep 18 '08 at 12:11

22

"Please don't assume Common Lisp is only useful for Databases, Unit Test Frameworks, Spam Filters, ID3 Parsers, Web Programming, Shoutcast Servers, HTML Generation Interpreters, and HTML Generation Compilers just because these are the only things happened to be implemented in the book Practical CL"
–
Mikael JanssonSep 20 '08 at 21:38

12

@JustinBennett yes you said it. Here: "In summary, learning Lisp (or Scheme) may not yield many practical applications beyond AI". I hate when people confrontate while being wrong.
–
Luka RamishviliNov 15 '11 at 12:21

Lisp is a large and complex language with a large and complex runtime to support it. For that reason, Lisp is best suited to large and complicated problems.

Now, a complex problem isn't the same as a complicated one. A complex problem is one with a lot of small details, but which isn't hard. Writing an airline booking system is a complex business, but with enough money and programmers it isn't hard. Get the difference?

A complicated problem is one which is convoluted, one where traditional divide and conquer doesn't work. Controlling a robot, or working with data that isn't tabular (languages, for example), or highly dynamic situations.

Lisp is really well suited to problems where the solution must be expandable; the classic example is the emacs text editor. It is fully programmable, and thus a programming environment in it's own right.

In his famous book PAIP, Norvig says that Lisp is ideal for exploratory programming. That is, programming a solution to a problem that isn't fully understood (as opposed to an on-line booking system). In other words: Complicated problems.

Furthermore, learning Lisp will remind you of something fundamental that has been forgotten: The difference between Von Neumann and Turing. As we know, Turing's model of computation is an interesting theoretical model, but useless as a model for designing computers. Von Neumann, on the other hand, designed a model of how computers and computation were to execute: The Von Neumann model.
Central to the Van Neumann model is that you have but one memory, and store both your code and your data there. Notice carefully that a Java program (or C#, or whatever you like) is a manifestation of the Turing model. You set your program in concrete, once and for all. Then you hope you can deal with all data that gets thrown on it.

Lisp maintains the Von Neuman model; there is no sharp, pre-determined border between code and data. Programming in Lisp opens your mind to the power of the Von Neumann model. Programming in Lisp makes you see old concepts in a new light.

Finally, being interactive, you'll learn to interact with your programs as you develop them (as opposed to compile and run). This also change the way you program, and the way you view programming.

With this intro I can finally offer a reply to your question: Will you find places where it outshines "traditional" languages?

If you are an advanced programmer, you need advanced tools. And there is no tool more advanced than Lisp.
Or, in other words: The answer is yes if your problems are hard. No otherwise.

Good answer! I like your bit about Neuman vs Turing.. How the answer above could be selected beats me. Its the typical cliche uninformed brabble about lisp ..
–
gilliganAug 7 '11 at 23:11

2

Great answer. The answer that should be selected, what an injustice. The asker didn't know much about Lisp, so believed whatever comforting truth he was told.
–
Luka RamishviliNov 15 '11 at 12:24

4

@gilligan Thank you for referring to my answer as brabble and an "injustice". I really appreciate it. At the time, I was sharing what information I knew about Lisp, in an attempt to be helpful an informative, can you fault me for that? It is people like you that take away from the quality of this community. If you are dissatisfied with an answer, downvote and move on. No need to make the answerer feel stupid for trying to help.
–
Justin BennettDec 27 '11 at 19:20

6

@JustinBennett And do you really want to say that marking wrong answers as wrong is taking away the quality of the community? No, the quality of this community consists of correct answers marked correct, and wrong (or not so correct) answers having lower reputation than that, so the next layman who wanders here can clearly see which is the correct answer in reality.
–
Luka RamishviliDec 28 '11 at 5:48

@Justin: It's probably worth noting that emacs core is written in C. But that's just nit-picking - all the commands are written in elisp.
–
BernardAug 7 '08 at 23:56

3

or rather -- the core syntax of common lisp is simple. defmacro allows extending the syntax, and some of the built in macros (such as defmacro) can get incredibly complicated; lambda lists, nested backquotes, etc.
–
AaronMar 26 '09 at 17:34

I programmed in Lisp professionally for about a year, and it is definitely worth learning. You will have unparalleled opportunity to remove redundancy from your code, by being able to replace all boilerplate code with functions where possible, and macros where not. You will also be able to access unparalleled flexibility at runtime, translating freely between code and data. Thus, situations where user actions can trigger the need to build complex structures dynamically is where Lisp truly shines. Popular airline flight schedulers are written in Lisp, and there is also a lot of CAD/CAM in Lisp.

Lisp is very useful for creating little DSLs. I've got a copy of Lisp in a Box running at work and I've written little DSLs to interrogate SQL server databases and generate data layers etc in C#. All my boiler plate code is now written in lisp macros that output to C#. I generate HTML, XML, all sorts of things with it. While I wish I could use Lisp for everyday coding, Lisp can bring practical benefits.

If you like programming you should learn Lisp for the pure joy of it. XKCD perfectly expresses the intellectual enlightenment that ensues. Learning Lisp is for the programmer what meditation is for the Buddhist monk (and I meant this without any blasphemous connotation).

Any language looks a lot harder when one doesn't use the common indentation conventions of a language. When one follows them of Lisp, one sees how it expresses a syntax-tree structure quite readily (note, this isn't quite right because the preview lies a little; the r's should align with the fns in the recursive quicksort argument):

"It only looks hard because you aren't using common indentation conventions " Uh, no, it looks hard because unlike most modern languages it is not easily human-readable or self-describing. I can infer what it does and why from having worked professionally in several other languages but would not want to have to modify or explain in any detail what it's doing. Compare to something like VB.net or Ruby. I don't know Lisp and maybe it's an intentionally brief and oversimplified example but the difficult appearance is certainy not limited to its indentation.
–
nathanchereFeb 19 '10 at 6:40

1

I think there is a fair criticism in what you say. I only mean to say "it looks much harder as you've presented it, and looks much clearer as it is presented here". I think that you would have to agree that many languages look a lot more confusing if their indentation conventions are not followed. Further, if we compare the indentation of, say Java and Lisp, I would say they generally require about the same level of knowledge of the basic constructs of each language to indent them correctly. But, it's fair, although entirely subjective, to say it still looks hard.
–
John with waffleFeb 22 '10 at 17:27

1

To make it a bit simpler you could use the standard let and use a defun at the start of the function to define fn as it doesn't change.
–
AaronRAug 25 '12 at 21:12

4

@FerretallicA On what basis do you determine whether something is “easily human readable” or “self describing”? Similarity to English? Is Chinese “easily human readable”? What about mathematical notation? Is it “not easily human readable”? This sort of argument is annoying gibberish, because its hidden message is: “This doesn’t look like the way I first learnt to reason.”
–
Justin MegawarneJun 15 '13 at 16:15

2

More like your 'rebuttal' sounds like "Whinge whinge". Try the programming language sniff test. Take someone who hasn't programmed before and show them a page of VB code and a page of Lisp code. I'll happily bet my left nut on which of the two the casual observer will be more easily able to draw meaningful observations from.
–
nathanchereJun 17 '13 at 14:49

I found that learning a new language, always influences your programming style in languages you already know. For me it always made me think in different ways to solve a problem in my primary language, which is Java. I think in general, it just widens your horizon in term of programming.

It's because you're a good programmer. Bad programmers, instead of influencing old skills with new knowledge, think in already known languages while writing in new ones. But why are you using Java after lisp? :) Java is hardest to use after Lisp, imo.
–
Luka RamishviliNov 15 '11 at 12:31

One of the most commonly repeated
myths about Lisp is that it's "dead."
While it's true that Common Lisp isn't
as widely used as, say, Visual Basic
or Java, it seems strange to describe
a language that continues to be used
for new development and that continues
to attract new users as "dead." Some
recent Lisp success stories include
Paul Graham's Viaweb, which became
Yahoo Store when Yahoo bought his
company; ITA Software's airfare
pricing and shopping system, QPX, used
by the online ticket seller Orbitz and
others; Naughty Dog's game for the
PlayStation 2, Jak and Daxter, which
is largely written in a
domain-specific Lisp dialect Naughty
Dog invented called GOAL, whose
compiler is itself written in Common
Lisp; and the Roomba, the autonomous
robotic vacuum cleaner, whose software
is written in L, a downwardly
compatible subset of Common Lisp.
Perhaps even more telling is the
growth of the Common-Lisp.net Web
site, which hosts open-source Common
Lisp projects, and the number of local
Lisp user groups that have sprung up
in the past couple of years.

I agree that Lisp is one of those languages that you may never use in a commercial setting. But even if you don't get to, learning it will definitely expand your understanding of programming as a whole. For example, I learned Prolog in college and while I never used it after, I gave me a greater understanding of many programming concepts and (at times) a greater appreciation for the languages I do use.

Okay, I might be weird but I really don't like Paul Graham's essays that much & on Lisp is a really rough going book if you don't have some grasp of Common Lisp already. Instead, I'd say go for Siebel's Practical Common Lisp. As for "killer-apps", Common Lisp seems to find its place in niche shops, like ITA, so while there isn't an app synonymous with CL the way Rails is for Ruby there are places in industry that use it if you do a little digging.

I'd say the opposite: if you already understand lisp because you have experience with a similar language then it's probably not necessary. If you don't understand what lisp has to offer, then you could benefit from the exposure.
–
Mr FoozNov 26 '08 at 14:46

@MrFooz there is no similar languages that can remove the need to learn the lispy part of lisp. The main features of lisp are not found in any languages. Though most are.
–
Luka RamishviliNov 15 '11 at 12:36

Depending on your goals. If you want to die, you don't need to breath. But that doesn't mean that you shouldn't.
–
mimoraleaMay 27 '14 at 0:03

Learning lisp will put Javascript in a completely different light! Lisp really forces you to grasp both recursion and the whole "functions as first class objects"-paradigm. See Crockfords excellent article on Scheme vs Javascript. Javascript is perhaps the most important language around today, so understanding it better is immensely useful!

The most important language? I think not, sir.
–
TraumaPonyNov 29 '08 at 4:58

7

Well, it's available on pretty much any device that has a web browser (and probably a few that don't), so as far as languages for running end user applications go, it has probably the highest penetration of any programming language on the planet. Obviously you could have an entirely different opinion on what's important. Will it be used to cure cancer? Probably not. But, like it or not, it will be one of the corner stones of (web) application development for years to come.
–
Erlend HalvorsenNov 15 '09 at 14:33

1

I went the same way! Although I was already using Javascript's functional and prototyping features, after learning Lisp Javascript was a new language nevertheless for me.
–
Luka RamishviliNov 15 '11 at 12:34

Complicated syntax? The beauty of lisp is that it has a ridiculously simple syntax. It's just a list, where each element of the list can be either another list or an elementary data type.

It's worth learning because of the way it enhances your coding ability to think about and use functions as just another data type. This will improve upon the way you code in an imperative and/or object-oriented language because it will allow you to be more mentally flexible with how your code is structured.

I took a "lisp class" in college back in the eighties. Despite grokking all the concepts presented in the class, I was left without any appreciation for what makes lisp great. I'm afraid that a lot of people look at lisp as just another programming language, which is what that course in college did for me so many years ago. If you see someone complaining about lisp syntax (or lack thereof), there's a good chance that they're one of those people who has failed to grasp lisp's greatness. I was one of those people for a very long time.

It wasn't until two decades later, when I rekindled my interest in lisp, that I began to "get" what makes lisp interesting--for me anyway. If you manage to learn lisp without having your mind blown by closures and lisp macros, you've probably missed the point.

I second that. I'm currently on my second foray in to Lisp, 5 years out of school. One term of Lisp when you're still green may not have adequate effect -- I remember focusing only on the metaprogramming, and didn't yet have appreciating for the metaprogramming and flexibility.
–
AaronDec 30 '08 at 5:20

You could use Clojure today to write tests and scripts on top of the Java VM. While there are other Lisp languages implemented on the JVM, I think Clojure does the best job of integrating with Java.

There are times when the Java language itself gets in the way of writing tests for Java code (including "traditional commercial programming"). (I don't mean that as an indictment of Java -- other languages suffer from the same problem -- but it's a fact. Since the topic, not Java, I won't elaborate. Please feel free to start a new topic if someone wants to discuss it.) Clojure eliminates many of those hindrances.

Lisp can be used anywhere you use traditional programming. It's not that different, it's just more powerful. Writing a web app? you can do it on Lisp, writing a desktop application? you can do it on Lisp, whatever, you can probably do it on Lisp, or Python, or any other generic programming (there are a few languages that are suited for only one task).

The biggest obstacle will probably be acceptance of your boss, your peers or your costumers. That's something you will have to work with them. Choosing a pragmatic solution like Clojure that can leverage the current install base of Java infrastructure, from the JVM to the libraries, might help you. Also, if you have a Java program, you may do a plug-in architecture and write Clojure plug-ins for it and end up writing half your code in Clojure.

Not a reason but (trivial) AutoCAD has LISP & DCL runtime support. It is a convenient way to write complex macros (including ActiveX automation) if you don't want to use VBA or their C++ or .NET SDKs, or if a DIESEL expression doesn't cut it.

"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot."