Clojure is frustrating... and it is a good thing

n 2016, the Clojure core team announced Clojure Spec, the most important addition to Clojure since v1.0.0. Spec allows you to describe and verify the shape of data (and much more) in a somewhat unique way. Having experienced developing a webshop from scratch in the dynamically typed JavaScript/Node.js, with the code growing in complexity and team in size, I very much appreciated the value of describing and checking data against a schema at important points of the program (without being swamped by doing it everywhere). In 2018 Rich Hickey in his talk Maybe Not discussed some shortcomings of Spec - some of which I have experienced personally - and work on Spec 2 started to address those and some limitations. I was fired up because Spec was great - and Spec 2 seemed to be perfect. I waited, and waited, …​ and waited. It is 2021 and Spec 2 is still nowhere in sight. That is truly frustrating. Similarly it has been with other design developments in Clojure such as named arguments. And it is, despite all my frustration, very, very important that it is this way.

There are two very good reason for taking as much time as necessary to make any design really good, both in Clojure itself and in the core libraries that are likely to be embraced as a part of the language.

The first reason is Clojure’s strong commitment to backwards compatibility - which I have blessed daily, after the experience I suffered through in the JavaScript and Node.js world. As Chris Siebenmann argues, A strong commitment to backwards compatibility means keeping your mistakes. Once you release something, you are stuck with it. So you want to make sure that you have as few and as small mistakes as possible.

The second reason is that discovering a simple Simple Made Easy solution to a problem takes a lot of time, thinking, and experimentation. Stu Halloway explains that convincingly in Radical Simplicity. You cannot really rush it.

So yes, the slow speed of design changes to Clojure is very frustrating when you wait for the outcome. But given the outmost importance of true simplicity and the longevity of the result, the benefits far outweigh the cost.


Tags: clojure

Are you benefitting from my writing? Consider buying me a coffee or supporting my work via GitHub Sponsors. Thank you! You can also book me for a mentoring / pair-programming session via Codementor or (cheaper) email.


Copyright © 2021 Jakub Holý
Powered by Cryogen
Theme by KingMob