66

Lisp obviously is an advantage for the AI stuff, but it doesn't appear to me that Lisp is any faster than Java, C#, or even C. I am not a master of Lisp, but I find it incredibly difficult to understand the advantage one would get in writing business software in Lisp.

Yet it is considered as a hacker's language.

Why does Paul Graham advocate Lisp? Why did ITA Software choose Lisp over other high-level languages? What value does it have over these languages?

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Geek
  • 3,951
  • 1
  • 24
  • 29
  • 21
    The line "I don't think Lisp is any faster than Java, C# or as a matter of fact faster than C" is somewhat confusing. C is typically held up as the standard for "fast code because you're programming close to the metal" -- it's the benchmark to beat for just about everything. Now, Java and other GC'd languages can beat it in some contexts, for example speed of memory allocation / cleanup. But, this sentence seems a little backwards nonetheless. – Michael H. Oct 04 '10 at 15:11
  • 2
    Lisp is a higher level language than those you mentioned, thus is generally slower. – segfault Jan 13 '11 at 23:23
  • 5
    @Bo Tian: "higher level language" needs an unambiguous definition. Even if it had one, this sounds like a non-sequitur. (thanks @Mark) – Mike Dunlavey Jan 14 '11 at 22:50
  • The answer is: To see how functional programming was like 50 years ago. :) – Ingo Nov 28 '11 at 16:01
  • 5
    @BoTian "higher level" does not equal "slower" by default. –  Jul 15 '12 at 12:54
  • 1
    @user1249: True. I recently heard that OCaml is very fast (in many cases comparable to C++?). – Giorgio Nov 01 '12 at 11:12
  • 28
    Lisp exists to show how wrong every other language designer has been. –  Apr 06 '13 at 03:54
  • In computing, things which are complete junk are "useful" to someone. So are very specialized programs that do only one thing and are rarely invoked. "useful" is a very low bar to jump over and to justify anything. – Kaz Oct 21 '16 at 04:48

17 Answers17

78

There are a few reasons I am working on becoming competent with Common Lisp.

  1. Homoiconic code. This allows structured self-modifying code.
  2. Syntax-aware macros. They allow rewriting of boilerplate code.
  3. Pragmatism. Common Lisp is designed to get stuff done by working professionals. Most functional languages aren't, as a rule.
  4. Flexibility. It can do a lot of different things, all at reasonable speeds.
  5. Wartiness. The real world is messy. Pragmatic coding winds up having to either use or invent messy constructs. Common Lisp has sufficient wartiness that it can get stuff done.

Arguably the only real reasons to choose against Common Lisp is that the standard libraries are dated.

I will go out on a limb and say that in the general case, syntax should not be an issue to a professional software worker.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Paul Nathan
  • 8,560
  • 1
  • 33
  • 41
  • 8
    Syntax can be an issue if it significantly affects readability or writeability. I don't think that's the case for Lisp. A good editor or IDE can do good enough syntax highlighting and paren matching to not be a big deal. – Matt Olenik Oct 04 '10 at 22:36
  • 4
    Also, I've only used Lisp a little (Common Lisp), and the general feel I got was that #2 was the biggest benefit to Lisp. Maybe I'm thinking in the wrong paradigm, but I don't think I've ever had a situation where self-modifying code was necessary. If you have a specific reason to use it, then yes, but otherwise the macros seem like the real killer feature. Edit: Just realized these are, in fact, the same feature. – Matt Olenik Oct 04 '10 at 22:37
  • 3
    @Matt: Yep. FWIW, I recently ran into Nemerle, a C#-ish CLR experimental language with macros. http://nemerle.org/. It's worth poking at some point I think, just for the experience. – Paul Nathan Oct 05 '10 at 04:59
  • @Paul yep, I've seen it but never taken a close look. I know Boo has syntactic macros – Matt Olenik Oct 05 '10 at 06:10
  • Would be interesting to see #3 expanded. Do you mean most are research-based and not real-world based? – sdg Feb 15 '11 at 13:34
  • @sdg: CL was developed by a committee which was focused on writing code in a practical, real-world sense. A ton of the ugliness is related to helping the compiler optimize. Unfortunately, those compilers was designed around 1980s machines..ahem. Anyway, the usual comparison is to Scheme, which is focused on being a 'pure' language, and is typically considered a researchy language. *I've* heard of CL used in the work-force- never heard of Scheme being used practically. – Paul Nathan Feb 15 '11 at 15:52
  • What are the advantages of "structured self-modifying code"? –  Aug 03 '12 at 19:11
  • @MattFenwick: defmacro. Check out the various "why CLmacros are cool" articles around. – Paul Nathan Aug 03 '12 at 23:33
  • If all you mean by that is "macros", I would suggest editing the answer to include the word "macro" just to make it more clear. –  Aug 06 '12 at 16:35
  • 2
    "Pragmatism. CL is designed to get stuff done by working professionals. Most functional languages aren't, as a rule.": I do not agree with this statement. I am very interested in Lisp and trying to dedicate some time to learn it. But I find other FP languages also very effective for "getting things done", at least this has been my experience with Scala and Haskell up to now. – Giorgio Oct 29 '12 at 13:01
  • Clojure is a better Lisp with tons of Java (or the host) libraries. –  Nov 24 '12 at 13:08
  • One reason in favour of Common Lisp that was not mentioned could be its object-oriented model (CLOS) which handles multiple dispatching without the need of the visitor pattern. – Giorgio Feb 07 '13 at 11:27
  • 1
    "CL is designed to get stuff done by working professionals. Most functional languages aren't, as a rule.": Can you elaborate on this? Especially on the second part of the sentence. Can you name a few examples? – Giorgio Nov 25 '13 at 10:29
  • 1
    Giorgio: Scheme was started as an exercise to develop optimized lexical scope. Haskell is mythical in its disinterest in success. ML was developed as a Modelling Language. However, at this point, I think I want to call out Clojure as a counterexample: it's been designed for success. At the time I posted this answer (3 years ago), Clojure wasn't even on my radar, and, I think, on very few people's radar. Common Lisp was designed by a group of people from industry developing large-scale software applications. – Paul Nathan Nov 25 '13 at 21:23
  • 1
    @PaulNathan I don't know if you capitalized `Modelling Language` in attempts to alluding to ML's name, but just to clear the air, `ML` stands for `Meta-Language`. In terms of Haskell's "disinterest in success", here is at least _one_ interesting story with respect to that statement: http://cufp.org/conference/sessions/2013/edward-kmett-sp-capital-iq-functional-reporting. Functional languages have strong roots in success, you just have to look a little harder, as instances aren't widely publicized. Blame it on the industry, or something else, who knows? – eazar001 Apr 29 '14 at 06:15
25

I like Lisp for its

  • unified, simple and elegant way of representing both code and data.
  • unique point of view, which gives me the crucial 80 bonus IQ points on solving hard problems (with hat tip to Alan Kay)
  • extremely agile, interactive and conversational development environment
  • unprecedented power to create and manipulate abstractions

Programming is fighting complexity. Abstractions are the only effective tool for fighting ever increasing complexity (with our very limited and constant skull size). Managing abstractions with Lisp is like having a genie with n+1 wishes.

Maglob
  • 3,839
  • 1
  • 24
  • 27
  • 5
    +1 for "Programming is fighting complexity. Abstractions are the only effective tool for fighting ever increasing complexity (with our very limited and constant skull size)." (I wish I could give a +10.) – Giorgio Oct 29 '12 at 13:08
  • What is the "extremely agile, interactive and conversational development environment"? – qed Nov 18 '14 at 23:48
  • 6
    Shouldn't that be `(+ 1 n)` wishes, or even more better practicality wise `(incf n)`? – Reb.Cabin Jan 25 '16 at 04:37
21

I believe the correct Lisp answer is more gnomic. Something like: "If you have to ask, you are not ready."

Then if anyone questions further, the correct answer is either "yes" if it's an either/or question or "You are not ready."

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
glenatron
  • 8,729
  • 3
  • 29
  • 43
  • 5
    Paul Graham quotes Louis Armstrong: “If you have to ask what jazz is, you'll never know.” – Jason Baker Jan 30 '11 at 20:31
  • 26
    +1. Though sometimes phrases like "If you have to ask, you are not ready" make me think that the one who says so simply cannot explain – superM Aug 24 '12 at 11:13
  • 5
    @superM Lisp and Lisp-like functional languages have the property that once one learns them, one can no longer explain them! – esoterik May 07 '15 at 23:03
19

I think that the Lisp advantage in the artificial intelligence (AI) field that everyone mentions is somewhat a historical accident... Lisp started for/in AI, but it's a general-purpose language.

I believe execution speed is not the only important aspect of a language (I did once, though). However, one of the aspects I like about Lisp is that for me, it combines Python and C in one. I can start to code with no declarations and prototype immediately and very quickly (the runtime and the REPL are very important for this). After I have something running, I add type declarations and "optimize" my code, little by little. It is a wonder to press a key in SLIME and watch the machine language generated for the function I'm interested in. In Python, there are no type declarations, so I cannot get more speed, but in C, getting anything done quickly is much more painful. Lisp is very useful in this case.

Having said that, I like Lisp mainly because of macros. When you finally understand what macros can achieve, I think you put up with parentheses easily. Also, editors like Emacs manage parentheses themselves so you don't have to. I admit, however, that I didn't find parentheses all that bad at the beginning, and I know some people just can't stand them. But since the whole purpose of macros is to generate code at compile time, code in Lisp uses a standard data structure, and the parentheses simply are a representation of code as lists, which is necessary to make macros simple to write.

I don't know any other language in which you can write little sublanguages to describe your problem better with the ease of Lisp. That is the advantage Paul Graham talks about in Beating the Averages. It is extreme modularity and conciseness. In Java I have to write a lot of raw text to express a single idea. In Lisp I could write some macros that generate that code automatically, and afterwards just use those. Anyway, you have to understand some examples of this and then judge for yourself. When I "saw" it, I was blown away, and I still think Lisp is the greatest language for this reason alone. I always look for macros in mainstream languages to see if they match the power of Lisp macros, but to date I didn't find any. Forth is a close second.

I'll finish with a couple of criticisms, in relation to business software:

  1. Business software needs libraries, and good ones, and Lisp is not good at this. I usually don't need them, but when I do, I have to choose from a little selection of incomplete software that a few people uses. I should contribute to fix this, I guess...

  2. Business software is usually built by large groups of people, and I think communication can be impeded with macros, since they basically change the language. A lot of programmers are more comfortable detecting certain patterns in code, even if the program text is longer and more repetitive. I suppose at ITA they have some rules regarding macros or they have a huge macro library that makes collaboration easy (or, more simply, all programmers are Lisp experts).

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Pau Fernández
  • 327
  • 4
  • 7
  • 7
    Try clojure, it is a lisp on the JVM. So by using the JVM you can use all the java stuff. – Zachary K Feb 15 '11 at 12:37
  • @zachary: There are at least 2 Common Lisp implementations on the JVM. ABCL is relatively mature. – Larry Coleman Feb 15 '11 at 16:34
  • Clojure is 100% Java-compatible (at least I have never found anything in Java that Clojure can't improve, and in such a way that the Javaists can't complain). Clojure is heavily influenced by the best of Common Lisp and the best of FP. With that and SBCL and CLisp and Emacs, any Lisper should feel like a king nowadays. – Reb.Cabin Jan 25 '16 at 04:42
13

I don't like Lisp.

(I do like many of the concepts it uses, how it makes powerful techniques available natively, and so on.

But I've never been convinced to actually go use it, ((even though several people have tried) because the benefits of the language can be achieved with other programming languages (some directly, some indirectly), so there isn't enough benefit to get me to spend the time learning it and putting up with the horrific syntax.)))

But yeah, for reasons that some people like it, check these Stack Overflow questions:

There's probably a few more in the related questions for those too.

Peter Boughton
  • 4,562
  • 1
  • 30
  • 27
  • 26
    "Putting up with the horrific syntax". Maybe it's just too long since I was a Lisp newbie, but the simplicity and regularity of Lisp syntax is a huge feature, since that's what it makes it possible for me to extend Lisp in itself. I can add custom iterators, I can add new "with-xxx" scope constructs which automatically clean up after themselves so the developer doesn't have to, etc. The syntax is a feature, not a bug. – Michael H. Oct 04 '10 at 14:18
  • 5
    The ability to extend a language with itself does not *require* a syntax limited to half a dozen characters. Also: _"The syntax is a feature, not a bug"_ ? - I know. I didn't call it a bug. – Peter Boughton Oct 04 '10 at 14:31
  • 8
    Okay, how do you get the benefits of the macro system? How many languages allow you to build an object-oriented extension to them in one reasonably short chapter (Paul Graham, "On Lisp"). – David Thornley Oct 14 '10 at 19:37
  • 6
    The syntax isn't any more horrific than other languages. I've found that the parentheses just visually "disappear" after a while. With good indentation, the code is easily readable. – Barry Brown Nov 12 '10 at 19:46
  • 2
    (with time (get-used-to you lisp-syntax)) – Jason Baker Jan 30 '11 at 20:43
  • 1
    @Jason is it scary that I read that without even noticing the word order switch-around? – Frank Shearar Jan 31 '11 at 09:40
  • 8
    But having the ability to easily move between S-exps seems huge... Then on the subject of parentheses, I like the following quote: *Parentheses? What parentheses? I haven't noticed any parentheses since my first month of Lisp programming. I like to ask people who complain about parentheses in Lisp if they are bothered by all the spaces between words in a newspaper" - Ken Tilton* – Cedric Martin Oct 26 '11 at 23:32
  • 1
    @David Thornley, there are many languages with decent macro systems built on top of a complicated syntax: Converge, Template Haskell, MetaOCaml, Nemerle, Katahdin, MetaLua. – SK-logic Dec 22 '11 at 08:24
  • 1
    What syntax? In Lisp, you're practically coding in the AST that would be generated by the lexer in most languages with what we normally consider "syntax" – Jason Lewis May 10 '12 at 03:47
  • 1
    Lisp can be programmed to accept any syntax. In its long history, there have been various projects to provide interfaces similar to some languages that were current at the time. For example there was a project called CGOL. A more recent example is the CLPython project which is a Python implementation in Common Lisp. None of such projects have really caught on with Lisp programmers, because people who are serious about Lisp tend to "get with the program" and reject such stuff. Is anyone using that `infix.cl` for serious work? Speak up. :) – Kaz Sep 23 '12 at 23:24
  • @JasonBaker You mean that if we use Lisp, we will all start sounding like Yoda? Well, that just explained a lot. – mydoghasworms Apr 10 '13 at 06:45
  • @PeterBoughton Have you /seen/ the amount of parentheses there are in your answer?! – rake Oct 29 '13 at 13:46
  • @ Dan Dyer: I do not get all the jokes about the nested parens. Why don't these joke apply to C, Java, C#, and so on? All those `(`, `)`, `{`, `}`. – Giorgio Aug 17 '15 at 14:12
  • Lisp removes (concrete) syntax from the programming language. This is a plus. A language with "rich" syntax is really just an imposition of the language designer's aesthetics on you. The first thing any compiler does is strip that all off and convert your program into a lisp-equivalent internal form (get gcc to dump its AST sometime). If you want to metaprogram (and you should if you don't), in a non-Lisp you need huge crufty libraries to project ASTs back into the designer's imposed aesthetic (e.g., .NET Expressions). Lisp just sweeps all that garbage out of the way. – Reb.Cabin Jan 25 '16 at 04:48
9

I'll interpret "Lisp" as "Common Lisp"; I've no doubt other answers will say "Scheme". (Hint: Lisp's a family of languages.)

What does "faster" mean? In terms of time taken to run a benchmark, no, it's not faster than C (but it can be).

"Fast" in terms of how long does it take Joe Random Hacker to write up a working program, or fix a bug in large software system? Almost certainly.

As for this hacker, I use it because I want to write code, not boilerplate. I want to write something once, and not continually repeat myself. And I want to interact with the program while I write it.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Frank Shearar
  • 16,643
  • 7
  • 48
  • 84
8

I like Lisp because it's an excellent medium for expressing my thoughts. The predicate for my favorite language is "If I could pick anything to express ideas in, what would it be?". Currently it's Lisp* (Scheme to be specific), to the point that I find myself writing out programming notes in it. As IRL, paper and pen notes. Even when I'm thinking about programs I need to implement in PHP or Ruby or Python.

This isn't a trick I taught myself, or something I do for nerd credibility (no one gets to see the inside my notebook anyway); it's just that Lisp is so much more natural for me to think in than any of the alternatives, and any language that resonates with you that deeply is one you treasure.

*Just as a footnote though, Haskell is closing the gap pretty quickly as I learn more of it.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Inaimathi
  • 4,884
  • 1
  • 26
  • 34
6

Paul Graham sort of answers this question himself in What Made Lisp Different.

Keep in mind he used it for his startup during the mid 1990s, so Python and Ruby weren't really mature at that point (or maybe not even born).

Lisp basically has all the advantages of dynamic languages, and I think for most of today's web applications, Python and Ruby are pretty awesome, and they have the advantage of frameworks and documentation and vibrant communities.

The killer feature is probably that the entire program is made of expressions. This means you can sort of pass around blocks of code to functions (or macros...), because a block of code is nothing more than an expression.

Python doesn't exactly have this feature; you'd have to define functions and pass them around. Ruby seems to have blocks, perhaps it's somewhat limited compared to what Lisp can do (I'm not sure).

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
hasen
  • 1,389
  • 1
  • 13
  • 15
  • The article by Paul Graham is interesting because, save for a couple of items, most languages these days seem to have the features he lists. So maybe Lisp was more compelling back in those days; nowadays it's more valuable as the language that introduced those features? – Andres F. May 06 '15 at 20:59
  • AST as language syntax is still domain of Lisp. I'm not aware of non-lisp language where macros have whole language available, during compilation time (Yes compiler basically hand macro call to macro definition which is Lisp program on it's own. You want to do http and db in macro at compilation time?) – przemo_li Jun 27 '17 at 09:50
6

The issue is power. Power = Work (program functionality) / Time

"We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp."

-- Guy Steele, Java spec co-author

Plot some kind of curve between C++ and Java. Keep going, and at some point along the line you'll find Lisp.

compman
  • 1,387
  • 13
  • 21
  • 2
    The problem here is that you lose a lot of C++ functionality going to Java, but pick it up again (often in improved form) when going to Lisp. – David Thornley Jan 13 '11 at 23:02
  • @DavidT The SO question [on that exact quote](http://stackoverflow.com/questions/3851158/how-does-java-drag-c-coders-halfway-to-lisp) has a link to the source (search for "cite"). The quote should not be taken so seriously. – Mark C Jan 14 '11 at 03:17
  • @David: Like macros. It's not just that they left them out in going to Java (and hence C#) but they made the lack of them a "virtue". Macros are really handy if I'm building a DSL on top of the base language. – Mike Dunlavey Jan 14 '11 at 15:50
  • @Mike Dunlavey: I really dislike macros in C++ (heck, I dislike them in C, but I don't have much of a choice there). I really like macros in Common Lisp. You know, I think my problem with that comment is that I like both C++ and Common Lisp a whole lot more than I like Java. – David Thornley Jan 14 '11 at 16:12
  • @David: I'm with you 100% on macros in Lisp. In C/C++ they are ugly and prone to abuse, but for the kind of ( [admittedly fringe](http://stackoverflow.com/questions/371898/how-does-differential-execution-work) ) stuff I do, they're *so* much better than nothing. Of course, when I do it in C++ it can very well be regarded as abuse, but in Lisp it is regarded warmly as clever. Go figure. – Mike Dunlavey Jan 14 '11 at 21:29
  • As for power - some great lines from Alan Kay in [The Early History of Smalltalk](http://www.smalltalk.org/smalltalk/TheEarlyHistoryOfSmalltalk_IV.html): "I asserted that you could define the "most powerful language in the world" in "a page of code." [...] I had orignally made the boast because McCarthy's self-describing LISP interpreter was written in itself. " – sq33G Dec 22 '11 at 19:54
6

The thing that I like about Lisp is that it transcends paradigms. Some people will say that Lisp is functional, others will say it's declarative, and others will say it's multiparadigm. I think all of these miss the point. When you use Lisp, paradigm is no longer a constraint.

Want objects? You can have them. Want functional programming? You can have it. Want Prolog-style logic programming? Write some macros. Want SQL-style declarative programming? Go for it. Want to use some paradigm that hasn't been invented yet? I'm confident it can be done in Lisp.

Aside from Forth-like languages, I have yet to see another language offer this level of flexibility.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Jason Baker
  • 9,625
  • 8
  • 44
  • 67
  • +1 Multi-paradigm programming, decades in advance of F#, very good point. – Orbling Jan 31 '11 at 00:55
  • I wish I could upvote this ten times. There is no spoon ... there is no paradigm ... It describes my feeling about Common Lisp with great accuracy :) – MadPhysicist Apr 06 '18 at 19:46
6

I have had a knee-jerk reaction to Scheme in the past, but now I am ready to give Lisp (Clojure, actually) a shot.

You see, over the years I picked up bits of languages like Java, C#, C++, Python, and things are no longer challenging.

Clojure has many promises, appears to be very clean, and can solve many real-world problems. A strong case for a clean language like Clojure is the advent of multi-core computers.

Yay LISP!

EDIT: ITA Software was founded by MIT grads, and Scheme/Lisp was the only language that many of the MIT grads learned. To be fair though, one can hot-swap Lisp algorithms on a running production system, which is a huge plus.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Job
  • 6,459
  • 3
  • 32
  • 54
  • 8
    Re: Things are no longer challenging---give Haskell a go and let us know what you think. Also, you can always try to learn some INTERCAL for a change! – Mark C Oct 04 '10 at 15:25
  • 3
    @Mark C, sorry but I am not touching `INTERCAL`. Challenge is not the only criteria; it has to be able to solve real problems fast as well. At least Haskell is used and loved by many. – Job Oct 14 '10 at 18:21
  • That was in jest, of course. – Mark C Oct 14 '10 at 18:29
  • 1
    Updating running code (carefully!) on a production server is one of the joys of Lisp, yes. Python, at least when I was playing with it, did not do this well; you'd have to manually recompile all functions/methods which referred to your changes, while all Common Lisp implementations handle that for you. I use that same power for development: write, test something, edit, test -- no compile loop, and you can take your interactive tests & turn them into unit tests if you wish. – Michael H. Nov 28 '11 at 20:58
  • @Job I forgot...`PLEASE`? – Mark C Jan 30 '12 at 05:47
5

I'm learning Lisp (newLisp) for a couple of reasons.

Reason number one: Lisp makes me think differently, which makes me a better Ruby coder.

It seems very awkward to do things certain ways in Lisp, for example nested iteration to go through multiple lists. So it forces me to use other things, like map. My favorite language, Ruby, has the same map method, but I don't always use it, because it's unfamiliar: I learned to do things using a poor technique, and when the language supports that technique I continue to use it.

Reason number two: Lisp is practical and has good modern libraries.

There's a very nice, lightweight web framework for newLisp called dragonfly. This allows me to use newLisp code instead of PHP for some tasks. I don't really like PHP, and newLisp seems more fun for this specific task than Ruby.

Reason number three: Lisp is syntactically and conceptually consistent.

For me, this is the big difference between Ruby and Python, consistency.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
philosodad
  • 1,775
  • 10
  • 14
  • +1: "Lisp is syntactically and conceptually consistent." This is a very important feature of a language. Some badly designed languages lack consistency, they are like a big collection of idioms thrown together in some order (I have one language in mind, but I won't name it :-) ). Lisp is in this respect very consistent. As soon as I have some time I will definitely try to learn it. – Giorgio Oct 29 '12 at 13:11
5

"Faster" isn't a simple thing to measure -- it really depends on which aspect you're benchmarking. Depending on the task and the Lisp implementation, speeds can approach C. Look at the Great Benchmarking Shoot-Out to dive in for details. The SBCL implementation of Lisp is on par with Java 6 Server and is significantly faster than Ruby or Python.

But, pure speed isn't the main reason to choose a programming language -- if it was, we'd all be programming in assembly language still, right? For me, the daily joy of Lisp is that the code is compiled, but I don't have to take down the application, recompile everything, and then start running from scratch. Instead, I can change a single function and that change will take effect everywhere, and I can immediately see the effect in my application. Moreover, that very quick "write, test, write more, test more" approach makes it much easier to test immediately up front while writing the code (and then you can turn those interactive probes into unit tests later on).

Imagine writing email where after every line, you had to hit a button to compile your email output to the screen before continuing your thought. That's what writing in Java or another language like that is for me. Sometimes there's a reason to do that, and I like Java fine, but Lisp is just more responsive, and it's easier to get work done.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Michael H.
  • 151
  • 6
  • If I were starting out fresh today, I'd probably pick Ruby -- it's inherited much of the Lisp nature, but it has more modern libraries and a single benevolent dictator driving it forward. But, that wasn't the question the OP asked. – Michael H. Oct 04 '10 at 14:47
  • I actually did pick ruby to start out, and now I'm trying to learn newLisp. – philosodad Jan 30 '11 at 19:39
4

When Lisp was created they started from math, not computer science (which didn't really exist yet). And the Lisp team got some things REALLY right. Lisp had garbage collection in 1960 or so! They really did a great job.

I think the The Eternal Flame song covers it.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Zachary K
  • 10,433
  • 2
  • 37
  • 55
4

Can you say "Brand Loyalty"?

I started in Fortran. I loved it.

I switched to Lisp. At first I hated it. Then I learned to love it, and hate Fortran.

Later Pascal, C, C++, various assemblers, C#. (Actually I don't love C#.)

I guess I'm fickle?

Mike Dunlavey
  • 12,815
  • 2
  • 35
  • 58
2

A big draw is the community. Lisp has had a draw for the most ambitious and bright developers since the language was invented. Wherever researchers are trying to solve problems that have never been solved you are likely to find Lisp, as in artificial intelligence (AI) research, computer vision, planning, knowlege representation, and complex heuristic optimization. The language lends itself to solving problems both from the bottom up and the top down at the same time, which seems to help in confronting the hairiest challenges.

The exensible syntax via macros means that there is seldom a need to extend the language definition. Much of what would require a language extension in a more restricted language is just a macro away with Lisp. So Lisp programmers are free to make use of newly invented language concepts without a new language standard and without necessarily a real speed penalty. On a basic level, reams of boilerplate code are made unnecessary by small extensions. Whole new ideas in control flow, like Prolog style unification, are implemented efficiently and compactly as extensions.

The OOP system, CLOS, is in a class of its own in terms of flexibility. It is very difficult to go back to rudimentary C++/Java/C# OOP after getting a taste. GoF 5 design patterns become unnecessary as they can be expressed simply and directly.

The language has had no single corporate owner and no single definitive implementation, though it does have an ANSI standard with many conforming implementations. Major new implementations come along every decade and the old ones are still quite active. Experts can plan to use their specialized knowledge for a long time to come. This does cause some anarchistic friction and community fragmentation, but it also means the carpet cannot be pulled out and the language can't become moribund for corporate or project political reasons. There are always multiple commercial and open source implementations being worked on. The more performance focused ones regularly benchmark within a 2x factor of the very fastest, heavily funded imperative language implementations.

The Achilles heel of early Lisp commercialization was memory footprint to accomodate both the type safety features of the language and the advanced software development environments they included, with incredible features like full online documentation including graphics. A 64 MB Symbolics Lisp Machine was not viable cost-wise against an 8 MB Sun workstation. Today, RAM prices have collapsed and there is tremendous interest in the Lisp languages especially considering that the mainstream Java, C#, PHP languages today have advanced only minimally over those of 30 years ago.

There are modern languages now in competition with Lisp for mindshare with intelligent developers: Python, Lua, Erlang, Haskell, and OCaml. But none offers the same mix of maturity, adaptibility, multiple standards-compliant implementations and speed.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
bcaulf
  • 1
  • 2
1

I don't actually do Lisp. But the place I work at does finite elements with millions of lines of mainly Fortran. The guy here whom I most respect about computing stuff (codes computational fluid mechanics) thinks the ideal combination is Lisp on the outside (mainly because you avoid messy problems with memory management), and Fortran for the low level algorithms (Fortran is best for exploiting the vector capabilities of SSE/AVX, and we think this lead is unlikely to close).

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Omega Centauri
  • 237
  • 1
  • 2