Clojure’s most important lessons
Clojure has a lot of important and unique lessons to teach, but which one is the most important? JAX London speaker Daniel Lebrero explains how he fell for Clojure and why it’s important to keep an open mind in programming.
Any programming language that you learn will hopefully teach you new techniques and ways of solving problems.
Using Clojure: Lessons learned
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 was I? How many other great things I have missed because of my cognitive bias? How about you?
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.
This post was originally published on Daniel Lebrero’s blog.
Daniel Lebrero will be delivering two talks at JAX London:
love is all you need to destroy your enemies