Why Java programmers have an advantage when learning Clojure
Posted by Amit Rathore on December 20, 2012
Cross-posted from Zolo Labs.
There is a spectrum of productivity when it comes to programming languages. I don’t really care to argue how much more productive dynamic languages are… but for those who buy that premise and want to learn a hyper-productive language, Clojure is a good choice. And for someone who has a Java background, the choice Clojure becomes the best one. Here’s why:
- Knowing Java – obviously useful: class-paths, class loaders, constructors, methods, static methods, standard libraries, jar files, etc. etc.
- Understanding of the JVM – heap, garbage collection, perm-gen space, debugging, profiling, performance tuning, etc.
- The Java library ecosystem – what logging framework to use? what web-server? database drivers? And on and on….
- The Maven situation – sometimes you have to know what’s going on underneath lein
- Understanding of how to structure large code-bases – Clojure codebases also grow
- OO Analysis and Design – similar to figuring out what functions go where
I’m sure there’s a lot more here, and I’ll elaborate on a few of these in future blog posts.
I’ve not used Java itself in a fairly long time (we’re using Clojure for Zolodeck). Even so, I’m getting a bit tired of some folks looking down on Java devs, when I’ve seen so many Clojure programmers struggle from not understanding the Java landscape.
So, hey Java Devs! Given that there are so many good reasons to learn Clojure – it’s a modern LISP with a full macro system, it’s a functional programming language, it has concurrency semantics, it sits on the JVM and has access to all those libraries, it makes a lot of sense for you to look at it. And if you’re already looking at something more dynamic than Java itself (say Groovy, or JRuby, or something similar), why not just take that extra step to something truly amazing? Especially when you have such an incredible advantage (your knowledge of the Java ecosystem) on your side already?