The Utility Of Lisp

The context is this StackOverflow question where the value of Lisp to modern computing is called into question. The following was my reply on an HN discussion thread.


Speaking as a Lisper, I have to admit that this is an open question for me. On the one hand, the needs of parallel systems and state management offered by functional languages stands to bring Lisps (Clojure, Common Lisp etc) and other languages like Erlang ever more attention as we programmers attempt to manage the complexities of multicore design and distributed systems.

As a systems programming language I think that lisp has utterly failed. The Lisp machines are dead for various reasons (which I’m researching right now as a side-project) and to the best of my knowledge compiled lisp has clearly not taken the place of C in building operating systems (although I hope to do exactly that as does the author of [http://www.loper-os.org/]).

All of this comes down to an individual’s definition of utility. Lisp is by definition of Turing Completeness just as capable as any other language you may wish to name, but with the usual Turing Tarpit or small language warning that you may have to roll your own. My perception, and one which several posts here on HN has affirmed is that traditionally Lisp was used by lone AI researchers who needed the power to roll their own anything quickly and efficiently. As a result of this “roll my own” mentality and simple lack of the internet (it was early and mid 1980s or so) libraries and SDKs as we know them were never built for Lisp systems. Another difficulty is that as several other comments note there is no “one true” standard for Lisp. There is Scheme (which has official specs), there is ANSI Common Lisp which is a spec upon which several implementations have been based, and then there are countless other DIY and nonstandard lisps which elect to use different function names and otherwise make code non-trivially portable between lisp implementations. Not having a clear standard didn’t help the lack of a library ecosystem at all, but some dialects such as Common Lisp and Clojure seem to be developing workable community library ecosystems. Of late Common Lisp has grown a library structure via ASDF code loading tool and the Quicklisp package manager, but Clojure is the only lisp I’ve ever encountered that really made any effort at all in the direction of providing native support for packaged libraries. The Clojure language includes syntax designed for allowing one file to explicitly state and “require” code in other files or even other libraries: a feature which is lacking from the Common Lisp standard. Thanks to technomancy’s Leiningen tool and the clojars repository Clojure has a user-created system similar to Quicklisp + ASDF but trading ASDF’s search path idiosyncrasies for a search path structure which should be familiar (or at least unsurprising) to Java developers.

TL;DR / Conclusion

If your boss comes to you and asks you to write a webpage, Lisp is probably not what you turn to. Could you? Sure, my blog is built in Clojure [http://arrdem.com]. [http://refheap.com] is built in Clojure. [http://www.chris-granger.com/] is (presumably) Clojure. I know I’ve seen blogs in Common Lisp and other dialects but URLs escape me. Your boss says “Access the database”, there are Clojure (okay fine Java but there is no real difference) libraries for SQL, MongoDB, Cassandra and more. Common Lisp also has SQL and MongoDB libraries. In short, while there is value in Lisp it is (for the time) not practically greater than the value of any other language despite the elegance of the functional approach and the power of the macro system. Hence its failure thus far to take over the world. However that same value proposition is improving as the CL and Clojure communities create and publish ever more libraries leading me to hope that Lisp may