days
-4
-1
hours
-1
-1
minutes
-3
-8
seconds
-2
-8
search
JAX Developers Puzzle deadline approaching: Play for a chance to win a complimentary JAX London 2018 ticket!
An ode to Clojure

Clojure’s most important lessons

Daniel Lebrero
Clojure
© Shutterstock /  astudio

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 easythe 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.

SEE MORE: Clojure — Treat code as data [Pirates of the JVM]

How blind was I? 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,  FregeGoErlangElixirIdris… 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.

 

This post was originally published on Daniel Lebrero’s blog

love is all you need to destroy your enemies

Author

Daniel Lebrero

Daniel Lebrero is a technical architect with more than 15 years of software development experience. He has worked on monolithic websites, embedded applications, low latency systems, micro services, streaming applications and big data. He now creates open source software at Akvo. A long time Java practitioner, he now also loves ().

Follow me @DanLebrero, drop me an email or connect with on LinkedIn.


Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of