Programming Clojure

Author: Stuart Halloway
Publisher: Pragmatic Bookshelf, 2009
Pages: 304
ISBN: 978-1934356333
Aimed at: Developers who are already familiar with Java
Rating: 4
Pros: A good introduction to Clojure
Cons: Clojure isn't going to appeal to everyone
Reviewed by: Mike James

No it isn't a spelling mistake - it is Clojure and not Closure. If you haven't heard of it before then the first thing to say is that Clojure is a relatively new language based on Lisp and running on the Java Virtual Machine.

If you know anything about Lisp, or have even heard a rumour of what it is like, then you will be thinking that it’s a difficult language full of brackets and strange commands. However, Clojure is Lisp "re-launched" or remodelled to make it easier to use and much more programmer friendly.

The first few chapters of this book ease you into Clojure and make the argument for why it is a worthwhile language. The basic idea is that it is a very minimal language with few in-built facilities and everything else is built from this very minimal foundation. It is exactly this that made/makes Lisp attractive to those programmers who like its syntax. Clojure simplifies the syntax with an approach that can be summed up as - only use additional syntax if it is really needed to make the statement unambiguous.

You don't have to dive into Clojure, however, as the book introduces it by showing you a Java function or fragment doing something obvious and then shows how to implement it in Clojure. Most of the time the shock of discovering that you don't need loops and the whole functional approach is enough to get you hooked.

It’s a fairly easy read - at first. But as the book goes on you slowly start to find the going tougher as the examples get more and more advanced. This is just a reflection of the fact that it takes time to absorb any new language - take time off from the book and try some code out.

I feel I should add that not everyone is in agreement that Clojure, or any language with a Lisp-like approach, is a suitable general purpose language. There are reasons why Java and other block structured, modular, object oriented languages are the way that they are and it isn't a cruel desire to make life more difficult for the programmers. Java, C# and so on are the way they are because of well accepted principles of programming and so far languages such as Clojure really haven't proved that they can be used to build maintainable systems.

Clojure is fun. This book is also a fun read and a fairly easy introduction to the language. After you have read it there are lots of resources on the web to take you further but this is a very good place to start.

Last Updated ( Friday, 18 September 2009 )
 
 

   
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.