Clojure - First Impressions
2022-03-01
I'm currently sitting in on another team for a few months. This gives me the chance to take a look at a tech stack different from ours. Switching from Scala to Clojure as my primary programming language. One month in, I'm impressed with the productivity and simplicity of the language. With next to no previous exposure to Clojure I've got a good handle on things.
Abstracting implementation details in Clojure is hard. This leads to a tad more repetition, but also makes everything more obvious. It's only functions calling other functions. Very clear, easy to understand. The syntax pairs well with this approach, as it also offers less possibilities.
Not having static types was an initial hurdle for me. But Clojure gives you the tools to explore and verify the data you pass around. There is “spec”, there is the tendency to have more unit tests. The REPL allows you to look inside the running machine. This has always been the most valuable tool, it's print statements on steroids.
The fast feedback loop Clojure and the REPL offer shines when working on frontend stuff. The ability to iterate fast makes UI work much more pleasant. Restarting the whole JVM for a simple template change always felt off.
There isn't anything I don't like about Clojure. I have yet to explore some unknowns like parallelism, shared state and performance. But from what I'm reading, Clojure won't disappoint.