In association with heise online

20 February 2009, 16:32

Groovy 1.6 released

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

Groovy is an open-source dynamic scripting language for the Java Virtual Machine (JVM). Since Groovy 1.5, released in December of 2007, there have been seven stage releases, culminating in: Groovy 1.6. This release focuses on performance improvements - for both the compiler and the runtime environment.

If you run Groovy code to evaluate an application, reducing compile time is critical because the code is dynamically compiled. The new version is up to four times faster than the previous release. The improvement in compile time is mainly due to improvements in the Dispatch method. Of course, while the benchmarks show great improvements, in practice the performance does vary greatly depending on the application.

Groovy is a dynamic language for the Java Virtual Machine (JVM) that originally only supported Metaprogramming at runtime. The new version now comes with Compile-Time Metaprogramming (AST Macros) as well. New macros in Groovy 1.6 include @Immutable, @Singleton, @Delegate, @Lazy, @Mixin and @Bindable.

The language includes new parallel assignments, such as in exchange (a,b) = [b,a], the references of the tuples on the left are assigned the values of the list on the right. Surplus list items are not allocated because of the lack of "null". In addition, there are the usual bug fixes and completions of the standard library (GDK), including support for Java Management Extensions (JmxBuilder). There are expanded notation options (DSL) for Meta-programming at runtime.

Of the included tools, GroovyDoc in particular is greatly improved. Also noteworthy are the improvements in Grape (Groovy Adaptable Package Engine), allowing a programmer to write, and ship, a script with an essentially arbitrary requirement for libraries. These are then used transitively and if necessary load from a repository (Ivy). One can either use the API grape or AST macro @Grab .

From the information given in the release notes it seems the upgrade from version 1.5 to 1.6 should be a smooth one.

See also:

(crve)

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


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit