Computing Reviews

Clojure cookbook :recipes for functional programming
VanderHart L., Neufeld R., O’Reilly Media, Inc.,Sebastopol, CA,2014. 476 pp.Type:Book
Date Reviewed: 07/09/14

Clojure is a Lisp variant that runs on the Java Virtual Machine (JVM). Like Lisp, it expresses code and data using the same structures, but it also has access to the many Java libraries. With multicore processing growing, interest in functional programming is increasing.

The two listed authors and 65 contributors from the Clojure community submitted the 170 recipes included in the book. Each recipe states the problem and the solution, and provides a very useful discussion that explains the solution including necessary details and background. Because the book draws so widely, it covers much of what Clojure programmers do and is an excellent resource; however, it is not suitable as an introduction to Clojure.

The first few of the ten chapters are primarily aimed at beginners but, even so, include tips not often mentioned. For example, Recipe 2.1, “Creating a List,” explains the difference between ′(1 x) and (list 1 x), where x has been bound to 2. On the other hand, the number of contributors sometimes leaves topics hard to find via the index. For example, the index lists the clojure.core.match library as being on page 153, but that library is used earlier in a recipe on page 114. In the actual recipes, a reference is usually given to further information.

Chapter 4 and 5 cover local input/output (I/O) and network I/O and web services, respectively. Chapter 6, covering databases, discusses connecting to a database and using Lucene, Cassandra, MongoDB, and Redis. It concludes with six recipes that work with Datomic. Chapter 7, on web applications, contains six recipes using the Ring library and also includes other tools. The concluding chapters are “Performance and Production,” “Distributed Computation,” and “Testing.”

Programmers using or planning to use Clojure will find this book very helpful. It is more of a compendium of current practices than a Clojure tutorial. Clojure’s concurrency constructs, including refs, atoms, and agents, do not seem to be mentioned, nor is software transactional memory.

More reviews about this item: Amazon

Reviewer:  Arthur Gittleman Review #: CR142485 (1410-0813)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy