Summary
In preparation for a 1.1 release, the Groovy project released the third beta 1.1 of Groovy, the dynamic language that runs on the JVM. New features include complete support for Java 5 constructs, including enums, customizable variable resolution in closures, new features for dynamic programming, and a much improved Groovy shell.
Advertisement
The Groovy project released the latest beta of Groovy 1.1, the dynamic scripting language that targets the JVM and works seamlessly with existing Java code. According to project lead Guillaume Laforge, significant new features include:
Ability to define enums in Groovy
Closure and map coercion to interfaces mechanism has been extended to work on concrete classes
It is now possible to customize the variable resolving strategy in closures ... so that you can decide whether you want to the resolution to go to the delegate first or only, to the closure itself, or to the owner
In the dynamic space, Graeme Rocher has been continuing enhancing and improving the ExpandoMetaClass and has added some new methods like methodMissing(), respondsTo() or hasProperty()
The ternary operator can be shortcut to simplify a != null ? a : "default value" into a ?: "default value". We call it the Elvis operator...
Jason Dillon has been working on improving the good old Groovy Shell (groovysh). It is still a work-in-progress, so by default, it is not activated, but you may try it by setting a NEWSHELL environment variable to a dummy value. Some completion is there thanks to JLine, ANSI color makes things more friendly on most platforms.. and the driving idea behind those evolutions was getting rid of the infamous "go" command. Romain Guy, on his side, along with the help of Danno Ferrin and Andres Almiray. have polished the Groovy Swing Console look'n feel