software, simply

Clojure's most important lesson

Clojure has a lot of important and unique lessons to teach, but which one is the most important?

Image attribution: Consultant shows Clojure code sample to VBA team via @progpaintings

Any programming language that you learn will hopefully teach you new techniques and ways of solving problems.

In the case of Clojure, it has taught me how great immutability is, the difference between simple and easy, the value of values, the power of the REPL and macros, the trade-off of dynamic typing, and the beauty behind parentheses.

Also, being so different, it has allowed me to reconsider a lot of common wisdom, resulting in heretical thoughts about global state, dependency injection, encapsulation, testing, types and such.

However, the single most surprising lesson has been how close-minded I had been at the mere idea of it, how biased I was, how I would immediately dismiss it and mock it, and how now, I will sing its praises.

If you had come and told me five years ago about a dynamically typed (what?? I am a proper engineer! Static typing is the only way to go!) Lisp (parenthesis make your code unreadable!) where everything is immutable by default (useless and surely very slow!!) and where you just work with maps of maps (unmaintainable and error prone!), I would have laughed at you.

How blind I was? How many other great things I have missed because of my cognitive bias? How about you?

I encourage you to go and learn Prolog, look at Shen, play around with Bloom, Scala, Kotlin, Haskell, Frege, Go, Erlang, Elixir, Idris … there are plenty to choose from.

But pick and learn something that is really different from what you are doing now or something that you have dismissed as silly before. That can even be Java or JavaScript.

Maybe you will not like everything that you see, but enjoy the journey, be open minded, and don’t be afraid to admit that maybe some of the stuff on the other side of the fence is cool, interesting or even better.

I leave you with a quote:

A language that doesn’t affect the way you think about programming, is not worth knowing. Alan Perlis, Epigrams on Programming.

Clojure, thank you.

Did you enjoyed it? or share!

Tagged in : Clojure good practices