Hey Kids, Try Groovy!
- By Matt Stephens
Groovy, the cringeingly named scripting language for Java, has had something of a mixed reception. It has an evangelical following, and even has a JSR (JSR 241) to standardize on a scripting language for Java.
Note that the JSR doesn’t mean that Groovy will become a part of the Java runtime, but instead seeks to “standardize” the language so that developers will have a “sanctioned” scripting language that they can use on the Java platform. The JSR is all about that warm fuzzy feeling, knowing that you’re walking the official line, creating a “standards-conformant” solution, and so on.
Groovy’s supposed big advantage is that, although it combines elements from various scripting languages such as Python, Ruby and Smalltalk, it uses a Java-like syntax. However, this is also its undoing: its syntax lacks cohesion, or an individual “feel”.
Although Sun appears to be having something of a “love-in” with Groovy at the moment, not everyone rates the language. This article articulates Groovy’s good, bad and ugly points extremely well. The article turns into something of a rant towards the end, but it’s a sign that this guy really felt the pain when trying the language out in good faith.
To sum the article up, Groovy is buggy, ugly, incomplete, inconsistent and, for all that, not a particularly great improvement over the Java language that it extends.
For me though, the main reason I won’t be using Groovy (or any other scripting language for that matter) is because I can’t think of a single reason why I would want to. For fulfilling business needs, getting real projects done, Java does just fine.
Java isn’t perfect, but trying to iron out its wrinkles by introducing a second language into the same codebase just isn’t worth the maintainability issues.