My Increasing Frustration with Clojure
Something that is often very hard to understand (it took me years to do so). Is that maintaining a language is insanely hard. Everything has a cost. Let me give a good example: A few years back someone submitted a patch that improved the error messages in Clojure. Worked great, just a single extra &quot;if&quot; and a message. It was committed to master.<p>Then people&#x27;s code got way slower. Why? Well this was a often used function and that single if blew the JVM inline budget causing that function to never be inlined. And that improvement had to he yanked out.<p>When we talk about patches for a language, we have to realize that if we don&#x27;t want constantly breaking APIs we have to test that a patch doesn&#x27;t break existing code, that it also doesn&#x27;t slow down existing code (or at least not enough that users would care), that in all sorts of cases the JVM won&#x27;t freak out and do something bad. Then we also have to make sure that the change doesn&#x27;t restrict the language in the future. Does making some interface public mean it will always be public? Are we happy to keep it that way for all time?<p>Taking all that into consideration, I have to sit back and say , yeah, maybe I&#x27;ll just remember to only hand sets to the functions in `clojure.set`. Or maybe I&#x27;ll help out by adding clojure.spec annotations for these functions so I can turn them on during testing.<p>In the end, I&#x27;d much rather have a rough-around-the-edges language that takes a garbage-in-garbage-out approach, than one that breaks the API at every turn. Perhaps they aren&#x27;t mutually exclusive, but it certainly takes a heroic effort, and a lot of prioritization.