17 votes

Why doesn't Common Lisp see more usage?

Hey all,
I've been studying Common Lisp recently, and as far as I can see, this is a pretty capable, mature language. Moreover, Lisp has been around since the 60s and it doesn't see much usage (as far as I'm aware) outside of Emacs Lisp and AutoLISP. What gives?

4 comments

  1. phos
    (edited )
    Link
    To quote Norvig: As for why I don't use it, I don't like the structure. I find languages like OCaml and Haskell to be a better fit for functional stuff, and Python and Javascript for other stuff....

    To quote Norvig:

    I think the ideas in Common Lisp did fix the world. If you go back to 1981, Lisp was considered unusual because it had features like the following that were not known to C programmers:

    • Garbage collection.
    • A rich set of collection types and operations on them.
    • A powerful object system with multiple inheritance and generic functions.
    • A powerful exception handling mechanism.
    • A sublanguage for defining test cases (ok, not an official part of the language, but I certainly had one set up).
    • interactive read-eval-print loop.
    • An agile, incremental development style rather than an all-at-once style.
    • Introspection into run-time objects and functions.
    • A macro system that lets you define domain specific languages.
      Today, all those features, except for macros, are common in the popular languages. So the ideas won, but the Common Lisp implementations didn't -- perhaps because CL had a lot of legacy cruft from a language that goes back to 1958; perhaps because some people just don't like parentheses.

    As for macros, I wish they had caught on too, but when you use them you are becoming a language designer, and some development teams, especially larger ones, prefer the stability of not having the language change underneath them. I think it would be better to handle macros with a style guide that defines best practices for their use, rather than removing them altogether (or having severely limited macros as in C)."

    As for why I don't use it, I don't like the structure. I find languages like OCaml and Haskell to be a better fit for functional stuff, and Python and Javascript for other stuff. If I need a low level language I'll use C (though I keep meaning to learn Rust). I don't think CLisp is better at any one task than those languages. Also I'm not a massive fan of parentheses. I'm told they fade away over time but still, I like my code to be aesthetic.

    6 votes
  2. nil
    Link
    LISP has seen a lot of usage in the 1960's, 70's, and 80's. There were lots of interesting dialects and implementations, all with their own sweet spots. LISP 1.5 on IBM iron was the first one...

    LISP has seen a lot of usage in the 1960's, 70's, and 80's. There were lots of interesting dialects and implementations, all with their own sweet spots. LISP 1.5 on IBM iron was the first one heavily used, mostly in computer algebra. It then evolved into MACLISP (from Project MAC, unrelated to the computer by the vegetable company) and INTERLISP and a few other efforts, like Portable Standard LISP, LISP 2, NIL (New Implementation of LISP), etc.

    In the 1980's, specialized hardware for running LISP was created by multiple companies (LMI, Symbolics, Texas Instruments, etc). The LISP Machines ran descendents of either MACLISP of INTERLISP. MACLISP evolved into ZetaLISP, INTERLISP into several branches running on different hardware.

    So in the late 70's there was MACLISP, Scheme, INTERLISP, Spice LISP, ZetaLISP, LISP Machine LISP, Portable Standard LISP, and may others. All of these were commercial or commercialized implementations, some of them running on specialized LISP machine hardware.

    So LISP has seen some massive usage in the course of time! Enough usage to keep several companies with several hundred employees afloat.

    Then COMMON LISP (later Common Lisp) came. It is pretty much a consolidation of all of the above dialects and one of the two dialects that are still commonly used these days, the other one being Scheme.

    Why was it mostly replaced by other languages in the 1990's? Some quote execution speed (which is a myth, there are LISP compilers that can easily compete with C), some garbage collection (which is a solved problem since generational and ephermeral GC).

    The truth is probably more political than technical. The agencies that funded the development of LISP moved on to new ventures and lost interest in the technology. Workstations became capable of running LISP efficiently, so LISP machines became overpriced artifacts (cool, but unnecessary). A few companies survived by selling LISP systems for workstations and then the PC came and workstations became overpriced artifacts (cool, but... you get the idea).

    Even today, though, there are still companies selling commercial LISP development systems, most notably Franz Inc, the creators of FranzLISP (now Allegro).

    One thing many people are missing about LISP is how cool parentheses are!

    LISP is homoiconic, so code and data share the same syntax. Hence it is extremely easy to extend the language using macros. Your LISP does not have a WHEN syntax (i.e. (WHEN condition expression ...))? Easy:

    (define-macro (when expr . body) `(if ,expr (begin ,@body)))

    Sure, other languages also have macros, and even Java has a code walker, but I doubt that you can define some new syntax in one easy one-liner in languages that are not homoiconic.

    Plus, the % command (match paren) makes editing LISP in vi(1) really easy. Move an expression? d%, move, p. Much easier than any other languages.

    And all the parentheses? You really do not see them any longer after a few weeks. And even if: they are beautiful. Esthetics is in the eye of the beholder.

    All in all, rumors of LISP's death are greatly exaggerated! Check out Planet Lisp (http://planet.lisp.org), Planet Scheme (http://scheme.dk/planet/), Lambda the Ultimate (http://lambda-the-ultimate.org/), or Schemers.Org (http://http://schemers.org/)!

    (Edit: markup)

    6 votes
  3. [2]
    Silbern
    Link
    The problem with LISP has generally been that it wasn't as accessible as its competitors. Early on, it relied on expensive proprietary equipment to run well, and from a theoretical standpoint, it...

    The problem with LISP has generally been that it wasn't as accessible as its competitors. Early on, it relied on expensive proprietary equipment to run well, and from a theoretical standpoint, it works much differently then most languages do, so you can't pick it up as easy as something like Python (for a C programmer for example). Eventually, this lack of adoption led to a lack of content; you can't find much general purpose lisp content, which leads to a chicken and egg situation of people not wanting to learn it because it isn't widely used.

    1 vote
    1. nil
      (edited )
      Link Parent
      Back in the days (1960's-80's), LISP did not really have any competitors, except for other dialects of LISP, and the "expensive proprietary equipment" was IBM iron, like the 70x and System/360 as...

      Back in the days (1960's-80's), LISP did not really have any competitors, except for other dialects of LISP, and the "expensive proprietary equipment" was IBM iron, like the 70x and System/360 as well as DEC machines like the PDP-1, PDP-6, and PDP-10. Was it expensive? Sure. But the same hardware was required to run FORTRAN or COBOL. Nothing special here. LISP machines came later and they did fill a niche, but not for a long time, because hardware development caught up so that LISP could run on an off-the-shelf SUN or VAXstation.

      Lack of adoption? Certainly not back then and not even now. Maybe lack of visibility, because there are few shiny FOSS projects, but certainly not lack of adoption. There are loads of quality packages for Common Lisp and for all kinds of dialects of Scheme. And there are even vendors who make a living by selling Common Lisp development environments. How many vendors make a living by selling C compilers?

      And, finally, LISP is not that different unless you want it to be different. That's its strength! Want to write imperative FORTRAN-style code in LISP? Go ahead? Declarative? No problem. Object-oriented? Sure! Functional? Knock yourself out.

      To anyone who wants to make an informed decision, I suggest you pick up some decent introduction textbook and work your way through it. For instance, Friedman and Felleisen's "The Little LISPer" or Touretzky's "Common LISP: A Gentle Introduction to Symbolic Computation". Or have a look at this list: http://schemers.org/Documents/

      Edit: for a more up to date and less academical work see Seibel's "Practical Common Lisp".

      1 vote