Groovy 2.1.0 arrives ready to invoke dynamically
The developers of Groovy have announced the release of Groovy 2.1. The new release of the JVM-based language now has full support for Java 7's "invoke dynamic" byte code and API, which allows dynamic languages on the JVM to make dynamic method calls as efficiently as Java programs make static method calls. Groovy 2.0 had support for most method calls using "invoke dynamic", but now all method calls make use of it. The GPars concurrency framework is also now bundled with Groovy 2.1.
@DelegatesTo annotation has been added to assist with documenting DSLs and providing information to IDEs and the static type checker and complication system added in Groovy 2.0. The static type checker has also been enhanced with the "type checker extensions". This allows DSL developers to take type checking further by creating their own customisable extensions to, for example, check literal strings containing SQL to ensure the syntax is correct, or to throw errors when DSL verbs are not recognised.
Groovy users can find their code contains many annotations and, in Groovy 2.1, the developers have come up with a way to make life easier and less repetitive by introducing meta-annotations – annotations which represent a collection of annotations – with support for passing arguments to a particular annotation in the meta-annotation. Groovy 2.1 also adds a number of enhancements such as custom base scripts and compiler customisations to make DSLs and Groovy compilation easier to manage.