Home GitHub Rss

Boring Benefits of Lisp

10/07/20

Lisp advocates are famous for having elaborate reasons for why Lisp is their favorite language. You might have heard that it’s the most powerful language, thanks to features like macros, first class functions, and homioconicity. Certainly, Lisp has no shortage of beautiful and influential ideas. But, almost every modern language has copied it’s most productive features. Are there still compelling reasons to use it in production?

For me there are. But, my interest is much more boring and practical. Fancy language abstractions don’t appeal to me, so the whole meta-programming isn’t as important. What I do care about is a reliable and stable ecosystem which allows me to write quality code that can last for a long time. Consider the following features:

You might think this list of features isn’t remarkable or unique to Lisp. That’s certainly true. C did them first, and established them as the recipe for releasing a successful language. Languages since have followed various steps, but the surprising thing is how few of them actually ended up with all the ingredients. Of course each item in this list is somewhat of a spectrum; some languages do more than others, but very few languages follow it to a degree that can be asserted with confidence. Usually, you can say a language somewhat satisfies it, followed by a list of ugly qualifications.

Take Python for example. It’s well designed, has great books and documentation, is fairly stable. It has an elegant design inspired by Lisp. But, is it standardized? Not really. They have a spec, but it only has one defacto implementation and changes all the time. Whatever the CPython project chooses to do defines the language. Alternative implementations exist, but they all have compatibility compromises. Python is also not very efficient. You can use a JIT implementation which makes it tolerable, but that has its own quirks, and you can’t use many libraries with it.

Lisp and C aren’t the only languages with all these benefits, but there aren’t as many as you think. Since Lisp has these great features and a design I enjoy using and studying it’s become my go-to language.

Update: 4/30/21: I recommend the article “Tips for stable and portable software” which discusses principles of stability at the language level, as well as the entire OS stack. It offers specific advice for reliable unix software.

Update: 09/23/21: Edited to clarify intended message.