Programming Clojure Beta 6 is now available. What's new:
- A new Chapter, "Functional Programming," exlains recursion, TCO, laziness, memoization, and trampolining in Clojure.
- A new Section, "Creating Java Classes in Clojure," shows how to create and compile Java classes from Clojure.
- The snake example has been moved into the concurrency chapter. The snake demonstrates how to divide your model layer into two parts: a functional model and a mutable model.
- The STM example in the introduction now uses
commute, which allowed a race condition. Given the problem domain of the example, the race condition was acceptable. However, explaining this in the introductory chapter would have been distracting.
- The lancet
runoncefunction now uses
lockinginstead of an an
agent. Yes, you can do plain old-fashioned locking in Clojure! Agents are unsuitable for the kind of coordination lancet requires, because you cannot
awaitan agent while inside another agent.
While I am talking about lancet: it now has its own repository. I have added integration with clojure.contrib.shell-out, so lancet can now call either Ant tasks or other applications. It is still far from being a replacement from Ant or Rake, but maybe your contributions can change that!
The book is now prose-complete, so if you have been waiting for the whole story, this is it. A number of readers have made suggestions for additional topics. If you have suggestions, please add them as comments to this post. For reasons of space and time, most new topics will appear in a series of articles on this blog, not in the book itself.
Thanks again to everyone who has been offering feedback. I have cleared almost 400 entries from the errata/suggestion page. Keep the feedback coming!