Over the xmas holidays I started learning Clojure. I'd been putting it off for a long time (since I saw Stuart Halloway present on it 9 months ago) so I read carefully through this lengthy article on Clojure, then the MEAP of Clojure in Action. The irony here is that I haven't read Stu's "Programming Clojure" book yet... but it's next on the list. Along the way I found some excellent screencasts by Lau Jensen on his blog. In particular, check out this one.
"Finally!" I thought to myself, all those years of using Emacs will come in handy once again. I got all the Clojure-Swank-Slime-Emacs stuff working and started hacking. I thought I'd also try out some IDE support for Clojure, and found Enclojure, a nice plugin for Netbeans. I found myself actually using Enclojure more than Emacs, as I've become a slave to fancy IDE's like Netbeans, Eclipse and IDEA. If you're exploring Clojure, I highly recommend Enclojure - if for nothing else the syntax highlighting so you don't get lost among the parens. It also has a built in REPL like the one Lau was using in his screencast. I actually worked through his screencast in Enclojure with a few variations in his demo code. I'm hoping to have some time soon to put together a screencast to demo Clojure and Compojure using Enclojure.
Being an old Emacs hack, and having worked with LISP, albeit many years ago, I found that Clojure is in fact it's own beast. It is significantly different than the LISP I used back then. That's not to say it's "better" or "worse", it's just different. Of course, Clojure runs on the JVM and has full interop with Java, or any JVM language for that matter. And this is the most compelling thing to me about Clojure - the ability to run on the VM, use the vast amount of open-source Java libs.
Writing LISP code is different than anything you've ever written before, if you're not familiar with it. I'm still working on getting my head around some of the idioms of Clojure and altering the habit of imperative coding that I do with Java or Groovy. I find one thing cool already - not having to track variables and "cache" them in my brain as I code. The whole thought process for writing Clojure code is different (at least for me), but it's growing on me as I find that I'm able to be more expressive in code without having to be more complex - in fact I think the Clojure code is simpler than equivalent code in imperative langs.
I'm not about to give up on Java or Groovy and start hacking Clojure full-time, but much like Groovy, working with Clojure makes coding fun again. At this point in time, I'm not sure where this journey into the world of Clojure will take me, but I'm enjoying the ride. Screencast coming soon, watch this space!

