Log in

No account? Create an account
The Titfield Thunderbolt Hue and Cry Whisky Galore The Man in The White Suit Previous Previous Next Next
Air on the GString - The Titfield Thunderbolt
Heisenberg might have stayed here
Air on the GString
Book Review: Groovy in Action, by Dierk König et. al.
Another book on another language for the JVM. I had previously thought of Groovy as a scripting language, an alternative to JavaScript. Certainly it can be used in this way, but it can also be compiled (in fact, even scripts are always compiled). Like Scala the emphasis is on minimalism and removal of boilerplate coding; the argument is that this leads to "clearer" code. I'm not entirely convinced, because it is only clearer after you have applied a lot of additional understanding.

The first part of the book covers the basics of the Groovy language syntax, including data types (such as GStrings), control structures and closures. This also includes a rather technical (but useful) section on class loading in the JVM and explains how Groovy augments standard Java classes effectively on-the-fly. The second part focuses on various parts of the Groovy libraries, and the third part covers a selection of advanced topics. The chapter on Scriptom integration in Windows is particularly interesting; the final chapter, on the Grails web framework, is written in a rather irritating and contrived conversational style.

Unlike the Scala book I read recently, whose purpose was to be merely factual, this book offers opinions to promote the Groovy language. Mostly this is reasonable although from time to time it becomes a bit grating, especially when subsequent paragraphs are somewhat handwaving on areas like performance. Several language features, such as closures, are now available in Java 8 so it remains to be seem whether these alternative languages have gained a sufficient foothold.

Tags: ,

Leave a comment