In association with heise online

25 January 2013, 16:37

Groovy 2.1.0 arrives ready to invoke dynamically

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Groovy logo 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.

A new @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.

The Groovy 2.1 release notes offer further details of the enhancements and the new version is available to download from the project's download page. Groovy is published under an Apache 2.0 Licence.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1791781
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit