Jump to ratings and reviews
Rate this book

The Joy of Clojure

Rate this book
About the Book

If you've seen how dozens of lines of Java or Ruby can dissolve into just a few lines of Clojure, you'll know why the authors of this book call it a "joyful language." Clojure is a dialect of Lisp that runs on the JVM. It combines the nice features of a scripting language with the powerful features of a production environment—features like persistent data structures and clean multithreading that you'll need for industrial-strength application development.

The Joy of Clojure goes beyond just syntax to show you how to write fluent and idiomatic Clojure code. You'll learn a functional approach to programming and will master Lisp techniques that make Clojure so elegant and efficient. The book gives you easy access to hard soft ware areas like concurrency, interoperability, and performance. And it shows you how great it can be to think about problems the Clojure way.

Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.
What's Inside
Written for programmers coming to Clojure from another programming background—no prior experience with Clojure or Lisp is required.

328 pages, Paperback

First published November 28, 2010

Loading interface...
Loading interface...

About the author

Michael Fogus

7 books589 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
396 (41%)
4 stars
386 (40%)
3 stars
135 (14%)
2 stars
29 (3%)
1 star
10 (1%)
Displaying 1 - 30 of 50 reviews
Profile Image for Rob.
Author 2 books382 followers
March 16, 2023
In the realm of technical, programming-related, computer science-type books, The Joy of Clojure is a bit of an oddity. And this is a very good thing.

WHAT THE BOOK IS NOT: The Joy of Clojure is not a beginner's introduction to the language. The Joy of Clojure is not a glorified appendix of methods and syntax. The Joy of Clojure is not a "cookbook" or a "how-to" or an "FAQ". The Joy of Clojure is not an explanation on how to shoe-horn your Java code into (some (graceful [parenthetical syntax:])). The Joy of Clojure is not a dry or sterile technical manual.

WHAT THE BOOK IS: The Joy of Clojure is as much a philosophical text as it is a survey of the language. The Joy of Clojure embraces the language's own flexible nature and describes itself in that way. The Joy of Clojure has a sense of humor. The Joy of Clojure expects a little work from you (but is willing to lend a hand along the way). The Joy of Clojure respects the baggage that you bring from your other programming languages, but expects you to check those bags at the door. The Joy of Clojure wants to make you a better programmer, not a Clojure programmer.

So... why 4-stars? I seldom give out 5-star reviews—I reserve those for books that completely blow my mind. While this one was a real eye-opener, my lid did not pop fully and totally off. Why not? Partly because I'm coming into Clojure as an outsider. It isn't a book for Clojure beginners—you could be a Clojure novice and get a lot out of this book, but I believe you would need a little more background in Lisp (its syntax can be a bit off-putting to outsiders and novices... and they even come out and say this in the book). How to get that 5th star...? A "chapter 0" for the complete novice? or maybe an appendix that can help that novice wade through some of the more esoteric-feeling elements of the language.—i.e., folks such as myself that are unfamiliar with Clojure (and/or Lisp in a more general sense [viz., I haven't looked at/used Lisp in probably... 10 years?:]) may find the language's syntax a bit... opaque? oblique? There's a learning curve with every language, I suppose but there are certain things in Clojure that look FUNDAMENTALLY WRONG to someone accustomed to a language like JavaScript or Java. The onus is (of course) on the reader to embrace these things (i.e., "Who is the one that opened the book and wanted to learn something new?") but it's sometimes easy to get lost in these little details.

I would absolutely recommend this to anyone I know that had an interest in Clojure and/or functional programming.
Profile Image for Alex Ott.
Author 3 books201 followers
September 1, 2010
Very good book on 'advanced' Clojure programming, discussing questions of clojurish programs design, optimizations, correct and optimal use of data structures.
I highly recommend this book for all, who already studied some Clojure programming (because this book premise, that you have Clojure experience) and wants to make your Clojure skills much better
Profile Image for Michael.
162 reviews63 followers
May 21, 2011
First things first, "The Joy of Clojure" really lives up to its name! Every page oozes with the excitement @fogus and @chrishouser have for the language and its community. This is exactly what makes this book such an enjoyable read, it's hard not to get drawn into the beauty of Clojure when you have two convinced developers sharing their passion with you.

That said JoC may not be a good first book to read for a Clojure newbie. It's deep like the language itself and it will take you a while to fully appreciate the elegance of what you encounter. I for one know that I'll be back to re-read sections that didn't fully sink in the first time around.

I'm willing to bet that Clojure is here to stay, and that "Joy of Clojure" will be seen as the Clojure book for quite some time to come. Why? Because it doesn't teach you the hows of the language, but the whys. Syntax may change between different Clojure versions, but the underlying concepts and design principles are likely to stay coherent.

All I can say is well done, this is exactly the type of book this beautiful language deserves!
Profile Image for Chris Maguire.
147 reviews5 followers
February 14, 2011
This book is a good primer on the advanced uses of Clojure: macros, threading, prototypes, memoization, etc.

This isn't just a regurg of the Clojure API; it was well written, funny and challenging. The authors really know their stuff.

I've ordered "Practical Clojure" and "Programming Clojure" to back fill some of the less advanced stuff.
Profile Image for Alexander Yakushev.
49 reviews34 followers
June 26, 2011
Excellent book about advanced Clojure usage. The vast number of covered topics and what's more important, how deep they are covered, makes "The Joy of Clojure" the best currently existing book for a skillful Clojure programmer.
Profile Image for Matija.
92 reviews20 followers
August 1, 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!
Profile Image for Giovanni Martina.
10 reviews2 followers
October 5, 2018
This is a good book that shows you how to write idiomatic Clojure code and explains some of the more advanced ideas of the language.

I cannot rate it 5 stars however. The book is billed as written for programmers coming to Clojure from another programming background but the first two code samples in the book showcase a for-comprehension and the doseq function without explaining anything about Clojure's alien lisp syntax.

I'm pretty sure you can get more out of this book AFTER having read a book that has a gentler introduction to the language. I also don't get Clojure programmers' obsession with one-letter argument definitions. I found several code samples hard to understand due to the use of this style and to me it just obfuscates code that could be made much clearer using more explicit naming patterns. The stuff on reducibles, continuations and concurrency was pretty hard to grok as well.

Overall I recommend this book for those who want to take a deep dive after having read other material on Clojure.
Profile Image for Marshall Vandegrift.
105 reviews1 follower
May 31, 2011
One of the best language-specific programming books I've read in quite a while. Throws the Clojure-beginner into the deep end a bit (I needed to lookup quite a few functions to understand the examples at first), but goes well beyond a trivial introduction to the language's syntax and standard library. Explains the hows and whys of Clojure idioms in a which clearly communicates what makes the language different. The section on when to use different reference types is worth the price of admission alone, and sure to be re-read many times.
Profile Image for Josh Glover.
32 reviews
March 29, 2014
Fantastic! It celebrates the way Lisp changes the way you think, and the way that Clojure implements and extends the Lisp philosophy. This book is much more about "why" than "how"; "Clojure in Action" is more "why"-ish, if that's what you're looking for. Read 'em both!

There is supposed to be a second edition coming out really soon.
Profile Image for Kiran Gangadharan.
35 reviews19 followers
March 30, 2016
A wonderful book if you're looking to learn the philosophies behind the language. I'm afraid I'm spoilt by this book in that I'm secretly hoping that such a book exists for all languages that I'm interested in. The exercises are neat and show off the terseness of Clojure.

I'm definitely looking to reread this after I gain some more experience with the language itself.
Profile Image for Erkin Unlu.
168 reviews19 followers
June 19, 2021
Colleague of mine recommended me this book to improve my understanding of Clojure. Unfortunately, it didn't do its job and nearly sucked all the joy of Clojure from me in the process. Style of writing is unnecessarily cramped, author used examples that usually don't explain why it's a good idea to use certain aspects of Clojure, but rather how clever they are that they could find these very interesting examples with amazing solutions they came up with. I really tried to liked the book but wasn't successful.

Note 1: Clojure is still the best language I've used and it's really a joy to be able to work with it.

Note 2: If you are looking for a more advanced level book that explains the important concepts of a language while giving the reader the joy, feel free to look at Functional Programming in Scala here: https://www.goodreads.com/book/show/1... .
349 reviews
August 12, 2018
As someone who's already somewhat familiar with the how of Clojure, and who was looking for more of the why, I think I was looking for a book that went more into detail with its examples. Especially the mutation chapter left me wanting more, and it would have been good to have more discussion on ways to pass state around your application in general, and when to use mutation vs arguments / callbacks.

I may reevaluate my rating if I come back to this with the kind of background the book seems to require.
Profile Image for Zach.
197 reviews
October 27, 2018
A good book to work through if you're going to use Clojure regularly and want a bit of introduction to some more advanced features. I was disappointed learning Clojure. I thought macros would be more interesting and useful. The best parts to steal from Clojure are its concepts for dealing with concurrency, which aren't really covered in depth here. To understand those, I recommend 7 Concurrency Models in 7 weeks, which has several chapters on Clojure.
Profile Image for Wanderson Ferreira.
32 reviews3 followers
April 13, 2020
From cover to cover this book is pure gold. Congratulations Michael Fogus for the amazing work. I learned so much and the references are very valuable too. I will continue to return to the book for more in-depth learning as I progress in my career.

Time is an illusion. Lunchtime doubly so. - Douglas Adams, The Hitchhikers Guide to the Galaxy

Profile Image for Ivo.
3 reviews
January 14, 2018
I've dropped this book with about a third of the way in.

I really disliked the way the authors present the content in this book. It's like speaking to a subject matter expert (which they are) that's more concerned about showing how clever and how much he knows, rather than laying out the concepts clearly, on target, and with less distraction.
Profile Image for Tony Poerio.
212 reviews11 followers
February 25, 2018
Great book on Clojure. Really helped me to understand macros for the first time. The first few chapters are a more general overview of the language, but then the pace picks up very quickly.

The later chapters get more deeply into advanced features and can be quite dense. I could see myself using this as a desktop reference manual in the future.
Profile Image for Nikolay.
99 reviews81 followers
January 12, 2018
Great deep-dive in the philosophy behind the Clojure functional features.
Profile Image for Veha.
1 review
October 28, 2018
the best book for people who already know some Clojure idea and want to push it to the next level
Profile Image for Pablo.
Author 1 book39 followers
July 5, 2019
I'm giving it five stars because this is the kind of books I like seeing. I don't want a catalog of syntax and features. The problem with that, specially when you arrive at a programming language that is vastly different than your own, is that you end writing programs in one programming language like if it was another. You could write Ruby like if it was Java and you'd be missing out all the wonderful bits of Ruby.

When it comes to Lisp and Clojure in particularly, there are many things that are not readily apparent for the newcomer and it's good to explore them with a book that tells you "you can do this in several ways but this is the Lispy way".

Having said that I think some parts of the books were overly complex. When Rich Hickey explains the sequence constructs in Clojure it feels like a beautiful, elegant tight system. In The Joy of Clojure it felt like a disaster, like a mountain of exceptions with corner cases waiting to get you as soon as you get distracted. When Rich Hickey makes it feel like Scheme, this book makes it feel like Common Lisp. I didn't like that.

Aside from that, if you are a Clojure programmer, I really recommend reading this book.
Profile Image for Jon Gauthier.
129 reviews223 followers
May 14, 2012
This book will not make you a master of the Clojure API. It will not drone on about minute details of the language's JVM implementation. Its authors do a brilliant job, however, of detailing the power and personality of Clojure and its opinionated backing philosophy. They show exactly why Clojure, its ecosystem, and its community are continually thriving nowadays — what makes the language so distinctive among modern systems and even among other Lisps.

This book is by no means a quick read — I ended up spending just about all of my time with JoC in front of a computer with a Clojure REPL and clojuredocs.org open, testing and fiddling with the extremely interesting bits of code on every other page. If you are committed to moving forward with this language, though, this is an absolute must-read.
Profile Image for Andrew.
135 reviews5 followers
May 6, 2016
This is a densely packed book. It covers many programming techniques. At times, I felt that the number got in the way of the exposition, in the sense that I felt like I could only get the best out of it when I brought an existing knowledge of the technique and it's motivations. However, this is hardly a fault but rather a reflection of the intended audience. In deed, I always found the examples rewarded a close reading.

This was the second time I read this book in that I also read two thirds of the third edition. I was really hoping to come away on top of the content, but there really is so much here, I could read much of it again and profit from it
Profile Image for Suvash Thapaliya.
24 reviews3 followers
July 14, 2015
This was a pretty intense book, and I'm glad I managed to go through at my 3rd attempt. Covers a lot, most importantly teaches 'The Clojure way'. It is sprinkled with references all over for the interested ones. Also, it really feels like the authors have tried to stay honest whenever it comes to talking/comparing techniques across various languages, whenever present. Being honest, there were sections that I just glossed over as this is my first pass at the book and my brain felt overworked. I'm sure I will be going for a more relaxed second pass, picking up the bits that I want to grasp better.
11 reviews1 follower
September 17, 2011
This is a dense book, in a good way. It didn't seem like any page was wasted, and the authors were never afraid to dive into real code and make things work. The organization of the book shows that the authors really have their act together and had lots of experience teaching the language before they wrote the book. As far as meaty, advanced Clojure literature goes, I'll say this is the best book currently out there. In fact, I might go so far as to say that this is one of the best hands-on programming books I've read.
Profile Image for Robert Postill.
127 reviews16 followers
January 20, 2012
This book is lovely. As a second book about Clojure it propels you from basic understanding through to deep understanding. It doesn't exhaustively cover the library for Clojure but it covers the thought process behind the language and definitely exhorts a better style of development. The information flow doesn't let up for all the chapters and as such you feel like you've learned an immense amount aas you move through the book. Having said that the conclusion is pretty much, we've stopped writing here's a closing paragraph. Which is odd considering the rest of the book.
Profile Image for Kevin.
18 reviews
November 30, 2012
I have to admit that the title is more clever than I like. I've learned in the past few years that "clever" things are the ones I wind up regretting, while "elegant" ones stand the test of time. That said, it's pretty much what the title implies: an exploration of how you can do this thing (program in Clojure, in this case) in ways that will maximize your enjoyment of it.

It's not aimed at the novice programmer, but at someone who's already familiar with Java programming and its underlying concepts, as well as with the basics of functional programming.
Profile Image for Todd Webb.
49 reviews5 followers
December 3, 2013
Partial Review: So I made it through to chapter 9 and then stopped to take a breath. The authors move very quickly through a lot of concepts and assume a significant amount of knowledge (they mention many CS concepts in passing and don't stop to explain). The book is probably great for someone with a very solid grounding in computer science theory. Given the minimal number of CS classes I had as an Industrial & Operations Engineer I just didn't feel like I could keep up. I'll probably revisit this one later and have moved on to a hopefully more beginner friendly book, Clojure in Action.
Profile Image for Paul.
36 reviews11 followers
April 9, 2013
Good book. Learned some things, but just a few.

Most of clojure, I learned online, but this book did have some things I'm really glad I learned; things I didn't get from reading and playing.

My big beef is that the book is ancient (in computer years). A second edition is coming out soon, and maybe that will fix it, but the book is based off clojure 1.2, and 1.5 is out now. So a lot of it felt rather outdated.
Displaying 1 - 30 of 50 reviews

Can't find what you're looking for?

Get help and learn more about the design.