What’s next for the Groovy language: The 2018 roadmap

JVM stalwart is being enhanced for modularity

Garry Knight (CC BY 2.0)

Groovy, the veteran language for the Java Virtual Machine, has several enhancements on its roadmap, such as to support Java 9 modularity and Java 8 lambda capabilities. Although closely linked to Java, Groovy offers additional capabilities such as the ability to write compile-time transformations and macros.

The Apache Software Foundation plans the following Groovy upgrades in the next year:

  • Versions 2.5, due in early 2018 for Java 7 and later.
  • Version 2.6 and 3.0, both set to arrive in about a year, and both currently available in alpha releases. Version 2.6 is aimed at Java 7 users, and Version 3.0 at Java 8 and 9 users; their capabitiies will be similar.

Planned Groovy 3.0 features

When Groovy 3.0 is released, you can expect the following additions and enhancements:

  • Groovy 3.0 will add support for Java 8 lambda syntax and method references.
  • Users will be able to run Groovy with the Java 9 JVM without getting warnings about features possibly not being supported.
  • Groovy can be invoked as a module on the JVM, using the Java 9 module path instead of the traditional classpath, which has not been set up to work with modules. The level of support for this capability is still being determined.
  • A more-flexible parser, called Parrot, supports additional syntax and language features.
  • Java’s class do/while loop, to ensure execution of a block of statements, is supported.
  • A macro capability expands the options for building compile-time transformations.
  • Java-style array initialization is added.
  • New operators for capabilities such as identity comparison are added.

Groovy 2.6 will have similar capabilities for Java 7 users.

Planned Groovy 2.5 features

When Groovy 2.5 is released, you can expect the following additions and enhancements:

  • Additional compile-time transformations to improve productivity.
  • A macro capability, expanding options for building compile-time transformations.
  • Better JSON parsing, for writing web applications that need to talk to a back-end system.
  • Improvements to tools and libraries.

Where to download Groovy

You can download the various versions of Groovy from the project’s Bintray repository.