Since 2010, I’ve been interested in functional programming and non-Java JVM languages, most notably Scala & Groovy.
However, whenever I tried to learn Scala, I ended up confused. I started with a passion, but the complexity of the language perplexed me. I love the ideas of Functional Programming:
pure functions
avoiding mutable state
no side effects
But I’ve found it difficult to write clean code in Scala. I never really understood the language. I felt it was a way harder to learn it properly than it should be.
On the other side, Groovy is easier to understand, but I can’t see much of value to justify using it in production. Sure, I’ve used it quite a lot for unit testing and even for some scripting, but I’ve never gotten much further.
Around 2013, I heard about Clojure and got interested. This was the first time I met a strange LISP-like language with all those braces. I read a chapter about Clojure in the book The Well-Grounded Java Developer. At the beginning, I wasn’t very convinced that Clojure code is more beautiful or readable than Java code., but I was getting curious.
From time to time, I read some article about Clojure, played a little bit with it and even watched some of Rich Hickey’s talks. I discovered fantastic and thriving Clojure community (Clojurians slack is awesome). I bought a copy of The Joy of Clojure, started to read it - and failed eventually. I wasn’t prepared.
For some reason, I still felt the growing need to explore and learn about this new world:
Why is that everyone in Clojure community is so excited about the language?
Does it really bring fun to programming again?
What are these immutable data structures and why are they so useful?
What does it feel like to use a dynamic language on a large scale?
Can we indeed write a concurrent code in a less painful and a more reliable way?
How can I leverage the power of Macros?
What are the benefits of using (almost) the same language on backend and frontend? (Clojure vs. ClojureScript)
Are the big systems written in Clojure, in fact, so much more compact than their Java counterparts while still being readable and maintainable?
This blog is my attempt to answer those questions.