Programming Clojure Paperback – Jun 7 2009
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
To get the free app, enter your e-mail address or mobile phone number.
About the Author
Stuart Halloway is a member of Clojure/core and CTO at Relevance, where he spends his time on secret projects for world domination, and watching Phineas and Ferb.
Top Customer Reviews
The examples are great and every new feature that made it into an example was explained immediately, especially if it wasn't something that pertained to the topic. This book isn't a reference, and doesn't read like one; however, I've got it marked up and bookmarked to go back to check out examples and sections.
Halloway is right in there when it comes to Clojure development and he knows of what he writes.
Most Helpful Customer Reviews on Amazon.com (beta)
Clojure is a remarkable language.
Clojure The Language deserves five stars every day of the week and twice on Sunday.
Clojure "The Book", on the other hand, is simply passable. The book is "okay".
Clojure is remarkable partly because Lisp is remarkable, and partly because Clojure has taken the difficult concept of concurrency and turned it into an exhilarating, attractive, efficient, sensible tool. I highly recommend that all curious programmers try the Clojure language.
Unfortunately, I cannot give this book a high recommendation. This is not a bad book. But it is definitely not a 5-star book.
The 5-star score would place this book in the same category as such beloved books as the Flanagan/Matsumoto Ruby book, or Meyers' Effective C++, or even Rossum's original (now deprecated) An Introduction to Python. Scoring the Stuart Halloway book as "on par" with those other books just simply does not ring true.
The Stuart Halloway book is a fast and easy read. However, it is more like a series of really nice blog entries than a solid introductory programming language book. I enjoyed Stuart's writing style, and I even enjoyed all of the sample code.
However, at the end of the day, "there is no there there".
I needed to refer to other books in order to become PRODUCTIVE with Clojure. When I purchased the Halloway book, no other Clojure books had been written yet, so I relied upon books that were written about coding techniques in other flavors of Lisp.
Reading the Halloway book was like watching a really fun and captivating movie trailer. It made me stop and say "Wow! That was cool! ... um... okay. Now can I watch the entire movie?"
If you are already fluent in another Lisp dialect, then you probably do not need this book.
In fact, if you already know some variant of Lisp, then you need to learn about the JVM and various Java platform ideas far more than you need to study Clojure itself. Clojure itself will come naturally to a "lisper". Yet you may be mystified about where to put your jar files and about what the various Java exceptions are telling you. And if you want to debug your Clojure programs, you will likely be using a Java debugger.
If you know Lisp, you can combine that previous knowledge with the Clojure API documentation, and the excellent Mark Volkmann website, and that will probably be enough. An "industrial strength" book on Java (including various compilation and deployment techniques) will help you much more than a book on Clojure.
If you have never programmed in any sort of Lisp at all, then I can almost guarantee that this book on Clojure will not be enough to get you fully "up and running" with Clojure. Most certainly you will learn how to write small scripts and games like the ones demonstrated in the book, but you will probably start to feel the weakness of this book as soon as you want to build something larger.
Programming Clojure strikes a nice balance between these two jobs, both justifying Clojure's existence, and lucidly explaining its key features. After a Foreword by Rich Hickey, the language's founder, the preface highlights its key features, and provides a frame of reference for how to think about Clojure from a variety of perspectives (coming from an OO, functional or lisp background). From there it's off to the races.
I bought a preview of this book and actually spent the better part of a Saturday plowing through much of it on my laptop, switching over to the command line to play along. Since then, I have gone back to re-read different sections as needed. Though the public documents at clojure.org are quite good, this book is definitely worth paying for if you are serious about learning Clojure.
Finally, it's worth mentioning that my experience buying the ebook / print combo directly from the publisher's site was good, providing both pdf and a variety of ebook formats (including one that looks nice on the kindle).
Stuart Halloway glosses over Clojure's fundamental language paradigms, like functional programming, recursion, and Java. While I suspect it would be near impossible to explain functional programming without devoting an entire book to it, Stuart Halloway doesn't even try, instead hoping that the reader will magically figure it out on his own.
The layout of the book is plain frustrating, leading me to wonder if Halloway actually wrote the chapters in the order that they're presented. More than once, Halloway uses the obnoxious literary device of referring to chapters after the current one. "We'll talk about this more in Chapter 18!" Just let me read the chapters in order, Stuart!
Save yourself some mental anguish and purchase The Joy of Clojure: Thinking the Clojure Way or Practical Clojure (Expert's Voice in Open Source) instead.
Progamming Clojure provides gentle yet thorough coverage to what is a new world for many of us. I've found Clojure great for new, green-field development projects but it's also very nice in existing Java environments. For example, I've used the skills acquired in this book to use Clojure for writing Eclipse plug-ins, JSR-286 portlets and even for REST/JSON services running on Google App Engine. Frankly, coming from a person who has also tried out many other alternative languages (including Python, Groovy, Scala, Ruby, etc.), Clojure has made programming more cerebral, productive and exciting all at the same time.
As an object-oriented programmer, when learning a new language I immediately look for ways to do familiar things like define classes and declare variables. Clojure is a functional language -- there are no POCOs (for lack of a better metaphor), but there are defstructs. Everything is a function. Immutability is the default.
This impedance mismatch between my world view and Clojure's is captured best in the "Where's my for loop?" section. The answer -- "Clojure's for is not a loop but a sequence comprehension" -- tells me that I'm not dealing with a language that will simply require me to put my parentheses in a slightly different order. I'm dealing with some serious metaphor shear.
That said, I think that Programming Clojure does a great job of introducing these concepts in a brisk, approachable way. Another reviewer complained of spending too much time in REPL (an interactive Clojure shell -- think BeanShell for Java, groovysh for Groovy, irb for Ruby, etc.). I found Stuart's REPL-centric approach to learning Clojure to be a huge plus -- it gave me a sandbox to explore the language, experiment with the syntax, and run the code as I read it. This isn't a book that I could simply skim -- I had the Kindle edition open, sitting next to my laptop with a REPL session running at all times. Stuart also talks about compiling and deploying Clojure in production, but as a learning tool, REPL's pedagogic value simply cannot be overstated.
The fact that Clojure runs on the JVM, and allows you to call into any Java class, gave me the best chance to see these two very different worlds running side by side. There is an entire chapter dedicated to Clojure/Java interaction. As Stuart says, "When you call Java [from Clojure], you enter the familiar, mutable world. This offers a comfortable haven for beginners learning functional programming and a pragmatic alternative to functional style when you need it." The examples involving the Collections API, JDBC, and even simple HTML output, were the most helpful to me. They demonstrated not just the syntactic differences between these two languages, but the semantic differences as well.
As you can probably guess from my 5 star rating of Programming Clojure, I think that "different" in this case is unquestionably good. Reading this book has stretched me in new directions. Each time you learn a new language, it makes you better programmer -- even in languages you already know. It forces you to reconsider your existing, tried-and-true approach to solving problems. Programming Clojure is a long-term investment in my knowledge portfolio.
Look for similar items by category
- Books > Computers & Technology > Computer Science
- Books > Computers & Technology > Programming > Java
- Books > Computers & Technology > Programming > Languages & Tools
- Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Object-Oriented Design
- Books > Textbooks > Computer Science & Information Systems > Object-Oriented Software Design
- Books > Textbooks > Computer Science & Information Systems > Programming Languages