Clojure and Scheme Compared

As I’ve said before, I’m sometimes tempted to take up Clojure but have always been put off by its reliance on the JVM. Last year, Mike Zamansky posted a couple of videos (1, 2) on using Clojure for the Advent of Code challenges that nudged me further towards giving Clojure a try.

Enter Peter Bex with a comparison of Scheme and Clojure. That seemed just what I needed to help me decide if I really wanted to invest time and effort in learning Clojure. It turned out that his post did, indeed, help me make up my mind.

One of my impressions from casual observation of Clojure code is that there’s more syntax than most other Lisps. For example, contra the “too many parentheses” crowd, I like that parentheses are essentially the only grouping deliminator in Common Lisp and Scheme. Less syntax is, in my opinion, one of the real strengths of Lisp. Bex agrees that Clojure does, indeed, have more syntax than other Lisps and that that’s not always a good thing.

The TL;DR of Bex’s post is that Clojure is—for the most part—a well designed language but there are definitely warts. For instance, you can optionally separate items in a list with commas (rather than just white space as in other Lisps) but that means that a new notation is now required for unquote in quasiquotes. Since using commas as separators is optional and little used, whatever benefit they provide is outweighed by the problems they cause. Similarly, the syntax for the let operator is different for no apparent benefit.

There are other gotchas. Take a look a Bex’s post for the details. My conclusion is that although Clojure is a nice language there are enough negatives that I’m still not convinced it’s worth the effort. Doubtless the intersection of the Clojure community and Irreal readers will explain the errors of my ways to me. And, really, I look forward to hearing from them because I’m still open to changing up my mind.

This entry was posted in Programming and tagged . Bookmark the permalink.