Matija's Reviews > The Joy of Clojure

The Joy of Clojure by Michael Fogus
Rate this book
Clear rating

's review
Sep 03, 2012

it was amazing
bookshelves: programming
Read from June 23 to August 01, 2014

At the beginning I'll say what the book already says about itself pretty vocally, but it's worth repeating: don't read this as your first book on Clojure! It presumes you already know quite a bit about its syntax, and even some of the most common idioms in use without giving even a passing mention. It jumps in right at the deep end of the pool where the table with cocktails is floating - I guess that's where the book derives its name from.

This is not a classical programming book. It makes a hugely interesting and comprehensive read, and for me, quite a page turner (I can say this about only one more programming book, Sam's Teach Yourself C++ in 21 Days by Jesse Liberty which I read literally decades ago and which taught me OOP proper). It gives a solid introduction to some of the basics like data types and language philosophy of Clojure. It assumes the approach of explaining the "why" rather then just the "how" and the "when", which matches well with the design motivation and process of Clojure itself - a language which was created to address particular hard problems of software design today.

The most important thing this book does is it teaches you idiomatic Clojure, but it doesn't stop there. It also touches upon many subjects which aren't necessarily exclusively related to Clojure like persistent data structures, functional programming techniques, lazy evaluation and other types of laziness in programming languages (some of which are not found in Clojure), concurrency and parallelism, and macros to name a few. It makes a few well placed comparisons of Clojure to Java on the one end of the mutability-eagerness-impurity spectrum, and Haskell on the other, where things are purely functional, immutable, and as lazy as they can get. When it deals with concurrency, it makes comparisons to Erlang. When logic programming is treated, Prolog is used as foil. It incentivizes the reader to explore further about various tangential subjects without forcing him or her to do so in order to grasp the material at hand. Generally speaking, it strives to expand the reader's understanding on every corner, and excels at that.

The first half of the book is written in a somewhat disconnected manner, jumping from one subject to the other, and it has a fair share of forward and backward references. This can be slightly annoying, but is definitely worth seeing beyond. In the second half, the book calms down in its flow and becomes a mighty river, full of insight and references to an eclectic body of both written and online materials while maintaining its own direction and momentum. In a few spots, it seems to not go deep enough, but it always corrects itself later. For example, the chapter on macros is somewhat underwhelming in itself with examples which don't do much to demonstrate the acclaimed power of this tool, but the book makes such splendid use of macros throughout some of its other chapters that the metaprogramming chapter becomes simply an introduction to the subject which is treated in context at many other places.

Joy of Clojure is an immensely well researched, illuminating and well written book - but remember: you must already have a pretty good understanding of Clojure's syntax and core principles if you wish to reap any benefits from it.

Now go, enjoy Clojure!

Sign into Goodreads to see if any of your friends have read The Joy of Clojure.
Sign In »

Reading Progress

06/23/2014 marked as: currently-reading
06/25/2014 page 17
5.0% "Clojure was born out of frustration provoked in large part by the complexities of concurrent programming, complicated by the weaknesses of object-oriented programming in facilitating it."
06/28/2014 page 113
34.0% "Clojure favors simplicity in the face of growing software complexity. If problems are easily solved by collection abstractions, then those abstractions should be used. Most problems can be modeled on such simple types, yet we continue to build monolithic class hierarchies in a fruitless race toward mirroring the "real world" - whatever that means."
33.0% "Macros are where the rubber of "code is data" meets the road of making programs simpler and cleaner."
33.0% "Clojure favors immutability but doesn't trap you into it when practical solutions are available."
75.0% "The rule of type hinting: write your code so it's first and foremost correct; then add type-hint adornment to gain speed. Don't trade the efficiency of the program for the efficiency of the programmer."
95.0% "Just because you can create a DSL, doesn't mean you should."
07/31/2014 marked as: read

No comments have been added yet.