A short bit on lisp dialects

by debianjoe


I’ve spent the last few days both extending a personal dialect that I’ve been writing on, and playing around with variations found in other branches of Lisp.  I love lisp, as it shortens the time between when I have an idea and when I can see it in action.  Compiled lisp programs are fast (not as fast as well written C, as some have claimed, but this is a whole other post that is far more technical…I’ll probably write it later), the core can be very clear and concise, and they do not require you to redefine the wheel for everywhere that you wish to place a tire.

That isn’t to say that the same cannot be true of other languages, such as Python and Perl.  It isn’t my point to debate using one language or the other.  Just use whatever serves your particular purpose.  On the other hand, to someone new to lisp in general, the differences can be a little unclear.  While I could write pages on dialects, I’ll try to keep this short, sweet, and clear.

Common-Lisp:  One of my personal favorites, as it’s very comprehensive and has some huge advantages for those who are looking to deal with large programs written in a relatively portable dialect.  Common-lisp has CLOS, which is a fun way to get really down and dirty with OOP at a deep level that actually makes OOP in other languages make more sense (to me, at least.)  I am a huge fan of SBCL as an interpreter and compiler, which is easy to set up on almost any Unix-like system.  The downside to common-lisp is that the choices and depth can sometimes be daunting to the newcomer, as there are often multiple ways to do the same thing.

Scheme:  You read SICP?  The lispy original?  If not, then you should.  It’s a great book, and also a great introduction to Scheme.  One of the big benefits to using Scheme is that it’s far more minimal at the core than CL, so it’s far more approachable and easier to learn the basics of.  The Revised5 Report on the Algorithmic Language Scheme is very informative and specific in covering syntax and semantics.  There are a few different options for getting Scheme up and running.  Racket (formerly PLT-Scheme), Chicken, or GNUGuile are some of the ones that come immediately to mind.  Many educational institutes teach Scheme, as it tends to be a good platform for learning recursion.

Clojure: I may need GekkoP’s input here, as I’ve not personally worked much with Clojure.  What I do know is that it runs on the Java Virtual Machine and that it’s lispy.  Beyond that, I’d just be writing someone else’s opinions that I haven’t personally experienced, so I’ll just leave well enough alone.  If you’re into Java, I would imagine it’s worth checking out.

Emacs-Lisp: A short dialect almost exclusively used for extending the functionality of GNU Emacs, elisp is an interesting one to be sure.  While it may seem silly to have a dialect based around a single program, there are many benefits to programmers of all lisps to using emacs.  I have personally used it more than I’d like to admit just to get some quality of life improvements for work on other projects.  It’s like sharpening your axe as a lumberjack, if that makes sense.  There are a few compatibility emulators, including the cl-lib extension for making it mimic the behavior of Common-lisp in some places.

All of that being said, it’s worth understanding that if program speed is the goal, C (or better yet, Assembly or Fortran for math….) is probably a better choice.  On the other hand, if you’re looking to learn a language that isn’t an ideology in and of itself while still giving you the freedom to explore ideas, then Lisp may be right for you.  Worst that can happen is you run screaming from a parenthetical overload. 😉