I second dnolen's recommendation of grabbing S. Halloway's book (I bought it, and it's great) and learning Clojure right off the bat.
I worked my way (partly) through SICP a while back and really struggled. I found Clojure pleasantly simple after that, possibly because I'd already had a bit of experience with Scheme. Still, especially for someone who's already familiar with Java, I'd say it's cool to jump right into Clojure. Rationale:
- You have convenient access to the entire Java API and the entire body of libraries written for Java; for example, I recently built a Swing GUI for/from a Clojure program, and used the Apache HTTP components to do some Web wrangling.
- Clojure tries to be less "lispy" than other Lisps: Cases in point are:
- reduction of "unnecessary" parentheses: e.g.
(cond (condition) (value) (condition) (value))
rather than
(cond ((condition) (value)) ((condition) (value)))
- use of something other than parentheses in a few meaningful places; e.g. argument lists and bindings for
let
and loop
, etc. are in [square brackets] rather than (parentheses). Makes function definitions easier to read IMHO.
- the list is not the only data structure. There are well integrated
- [vectors] (random accessible like arrays) and
- {hashmaps};
These make life easier, especially if you're used to having them in Java.
- The function for defining functions is
(defn)
. You of all people should appreciate that ;)
A recommend-worthy first tutorial is Moxley Stratton's Clojure Tutorial. There's also a huge SO discussion on Clojure tutorials that yields up a lot of links.
Something I found enormously helpful with my first steps in Clojure was the Clojure Cheat Sheet. This addresses the common case where you know roughly what you want to do, but not which function to use. One would wish other languages would adopt this concept. Having found a likely function for your need, you can get more documentation on it using (doc <name>)
in a Clojure REPL.
Your mileage may vary, of course; but by the time Amazon delivered Programming Clojure I had already learned enough Clojure from the Web that the book was more a source of "the big picture" than a tutorial for me. But certainly one could do a lot worse than learn Clojure programming from that book.
Possibly it's apparent from the above that I'm enthusiastic about Clojure. I find it refreshingly different after years of Java, and powerful enough to accomplish whatever itches me. I even donated to the project :)
At the risk of regretting this later, I also offer (free) beginning Clojure assistance and tutoring via email, Google Chat or Wave. My mail address should be pretty easy to guess.