Lisp quest discovering a parenthesis world

Brief introduction to Lisp dialects and implementations

Your journey into the Lisp land starts with a choice - and it is not the choice between starting or not. The choice you have to make is about the Lisp dialect you want to learn. Since Lisp is a family of programming languages you can’t actually write Lisp code. Therefore you need to use a Lisp dialect such as Scheme, Common Lisp, Clojure or Racket. The complete list is much longer but these four are the most popular and active nowadays.

Suppose you choose Common Lisp. Do you think you could just download it and start writing code? Unfortunately it is not so easy and another choice is required. Since Common Lisp is a specified language1, this time you need to pick an implementation among the many available implementations. SBCL (Steel Bank Common Lisp), Allegro Common Lisp and LispWorks are just three examples from the existing dozens.

Every specification-compliant Common Lisp implementation behaves similarly to the others. So how to choose the right one for you? Despite being all similar, each implementation is different from the others. In fact, some implementations could support some operating systems and particular architectures (e.g. ARM) while others do not. Another key difference is the license. For example, SBCL is free software while Allegro Common Lisp has a commercial license with a freeware option. Moreover, some implementations provide useful extentions and advanced features for specific use cases. For example, LispWorks which is shipped with a Java interface2 and a multiplatform GUI Toolkit.

When using Scheme or Clojure you have a similar situation. With Clojure you can pick Clojure itself, running on the JVM, Clojure CLR, running on the .NET platform or many other implementations. If you want, you can even use it in your browser using ClojureScript. The only exception in the four Lisps listed at the beginning of this post is Racket, and in future posts we will see why.

So, where to start? A wise choice is to start with SBCL that is free and available for almost every platform3. After the installation you run it and start playing with the REPL (read-eval-print-loop) from the command line. They have also created a mirror on Github so you can follow the releases using Github notifications. If you are not satisfied, you can always pick another implementation and use it - your code will continue to work in the same way as before.

All these options can be a bit confusing, but after learning the relationships between Lisp dialects and the implementations, everything will be clear and you will be happy to have so many choices.

  1. ANSI Common Lisp. 

  2. If you need to interact heavily with Java, Clojure is a better choice. 

  3. An sbcl package is available in almost all Linux distribution