Clojure is a practical, general-purpose language that offers expressivity rivaling other dynamic languages like Ruby and Python, while seamlessly taking advantage of Java libraries, services, and all of the resources of the JVM ecosystem. This book helps you learn the fundamentals of Clojure with examples relating it to the languages you know already, in the domains and topics you work with every day. See how this JVM language can help eliminate unnecessary complexity from your programming practice and open up new options for solving the most challenging problems.

Clojure Programming demonstrates the language’s flexibility by showing how it can be used for common tasks like web programming and working with databases, up through more demanding applications that require safe, effective concurrency and parallelism, data analysis, and more. This in-depth look helps tie together the full Clojure development experience, from how to organize your project and an introduction to Clojure build tooling, to a tutorial on how to make the most of Clojure’s REPL during development, and how to deploy your finished application in a cloud environment.

Learn how to use Clojure while leveraging your investment in the Java platform

Understand the advantages of Clojure as an efficient Lisp for the JVM

See how Clojure is used today in several practical domains

Discover how Clojure eliminates the need for many verbose and complicated design patterns

Chas Emerick

Chas Emerick is the founder of Snowtide Informatics, a small software company in Western Massachusetts. Since 2008, he has helped to develop the core Clojure language and many Clojure open source projects. Chas writes about Clojure, software development practices, entrepreneurship, and other passions at cemerick.com.

Brian Carper

Brian Carper is a professional programmer in the field of psychological research. He uses Clojure for data analysis and web development. He's the author of a Clojure-to-CSS compiler and relational database library, and writes about Clojure and other topics at http://briancarper.net.

Christophe Grand

Christophe Grand is an independent consultant, based near Lyon, France. He tutors, trains and codes primarily in Clojure. A participant in developing the core Clojure language, he also authored the Enlive and Moustache libaries and is a contributor to Counterclockwise, the Clojure IDE for Eclipse. Christophe writes on Clojure at clj-me.cgrand.net.

The animal on the cover of Clojure Programming is a painted snipe. The painted snipes (family Rostratulidae) comprise three species: the Greater Painted Snipe, the Australian Painted Snipe, and the South American Painted Snipe.These shorebirds are distinct from the true snipes, and, as their name implies, also much more colorful. They may be more closely related to jacanas or sandpipers. Painted snipe live in marshes, swamps, and other wetlands, and they eat a varied diet of seeds, rice, millet, insects, snails, and crustaceans. They are solitary and “skulking,” except during breeding season, so they are difficult to spot.The Greater Painted Snipe (Rostratula benghalensis) lives in Africa, India, and Southeast Asia. The Australian Painted Snipe (R. australis), long considered a subspecies, is found only in Australia and is classified as endangered. These two species of painted snipe exhibit an unusual sexual dimorphism, with the females larger and more brightly colored than the males. They are polyandrous, with the female courting several males, and the males take responsibility for incubating the eggs and raising the chicks.The South American Painted Snipe (Nycticryptes semicollaris) is found in the southern parts of that continent. It can be distinguished from the other painted snipes by its webbed toes. The South American Painted Snipe mates monogamously and doesn’t display the same degree of sexual dimorphism as the Greater and Australian species. It is hunted for food in Chile and Argentina.The cover image is from Riverside Natural History. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont’s TheSansMonoCondensed.

This is a generally clear and well explained book on Clojure. I found that functional programming and Lisp syntax both take a bit of getting used to, but Clojure does seem to offer something new so for me it was worth getting past those obstacles. Fortunately the book doesn't require an in-depth knowledge of Java, which I found refreshing compared to recent reading on Scala which seemed to get bogged down in Java interoperability issues.

I'm liking this book so far. It moves pretty fast, which I like. The explanations which are there are well-constructed. I'm not very far into it, so I can't comment on its completeness of coverage, but so far I haven't seen any significant gaps.

Now for the complaints. :-)

I would have appreciated an early comparison between Clojure and Common Lisp to prevent such newbie mistakes as assuming that () and nil are equivalent. (That fact *is* eventually mentioned, but not until I wasted some time figuring it out.)

There are too many examples which use functions that are not explained. For example, on page 34 is the example:

The functions "zipmap", "repeatedly", "partial", and "assoc" are not explained previously or subsequently in that chapter. I can accept that to a degree, especially if the functions are pretty self-explanatory, these functions are NOT self-explanatory. I like to fully understand examples, and this one literally took me over 20 minutes of web searching to understand. Without that study, the example is worthless to its intended goal of demonstrating retention of the destructured value.

So if you are using this book, you should have a live browser handy to look up functions. I find http://clojure.org/cheatsheet to be very helpful.

A final complaint - the index is very poor. This doesn't matter much if you have an electronic version you can search (I bounce between my paper and PDF versions of the book), but for paper-only customers, the index will be a disappointment. For example, it doesn't include standard Clojure functions.

In spite of those complaints, I do recommend this book for Clojure beginners.

This is a wonderful book! Just bought it, and I'd say it's one of my favorite technical books of all time, for the interesting subject matter and the excellent treatment.

It provides unusually clear explanations of some of the subtler parts of Clojure, like the various reference types, and the relationship between namespaces, symbols, vars, and values. It also provides instantly practical advice on day-to-day areas like web development, illustrating the use of popular third-party libraries and discussing the pros and cons of alternative deployment strategies.

I'd already used Clojure for small projects for a while. But this book helped me solidify my understanding of the language and to get perspective on a lot of rarely summarized issues that you need to understand to use the language in earnest.

If you're interested in Clojure, and are not already deeply expert, then it's worth it to buy this book. This is especially true for people familiar with lisp dialects but not particularly familiar with the ins and outs of the JVM ecosystem in which Clojure operates.

(This review is based on the the ePub version, which renders well on iBooks.)

I think I haven't evolved enough to fully appreciate the Clojure. I was thinking that maybe nowadays I will be able to appreciate the functional programming. I am not. I don't find Clojure helpful in my day to day work, however, I definitely value the way topic is presented. Clojure programming is simply well designed book. You can tell that Chas, Brian and Christophe know the subject. If you haven't worked with Clojure before, afraid not, authors will guide you from the very beginning (downloading and installing Clojure) to topics like web development.

Very good signal/noise ratio: approachable, the most practical yet thorough book on Clojure. Good introduction to Clojure's state/identity/concurrency philosophy, functional programming and the Clojure ecosystem. When asked "what book on Clojure should I read?" I now says "Clojure Programming from O'Reilly"