Groovy 2.1 completes JDK7 ‘invoke dynamic’ support
After last June’s big release, the team behind dynamic JVM
language Groovy have provided a welcome update that brings full
‘invoke dynamic’ support. The announcement was the centrepiece of
Groovy’s first Spanish conference in Madrid, Greach.
The JDK 7 instruction, dubbed ‘indy’, introduced simplified implementations for dynamic language compilers and runtimes, allowing languages such as Groovy, Scala and Clojure to get the first class support they deserve on the platform. The Groovy development team made great strides towards offering this in the second iteration, but the newest update takes things further by allowing constructor calls to use the instruction.
The latest version of popular concurrency framework GPars, which makes concurrent programming in Java and Groovy easier, has found its way into the distribution. Complete with Scala-like actor constructs and data parallelism, its inclusion with the full language distribution certifies its rise from Groovy-inspired offshoot to a key part of its future.
Project lead Guillaume Laforge notes other additions like a new “special annotation to assist with documentation and type safety of DSLs”, which in turn adds static type checker extensions. There’s further customisable compilation options and a new meta-annotation facility to combine annotations into one “alias” annotation.
Having chalked up nearly two million downloads last year, Groovy and its array of sub-projects look set to enjoy further success. Another version is planned follow soon after Java 8’s release to take advantage of the new language features.
For more details on Groovy 2.1’s new features, check out the release notes. Also worth reading is the series of posts from Grails/Groovy developer Andre Steingress showing what you can do with Groovy 2.1