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?
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. 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.
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)
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.
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".