Groovy 3 Adds Parrot Parser
Written by Kay Ewbank   
Monday, 17 February 2020

The latest version of Apache Groovy is available with with a brand new parser (code-named Parrot) among other improvements. Groovy is an optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform.

The aim of Groovy is to improve developer productivity because of its concise, familiar and easy to learn syntax. The developers say it integrates smoothly with any Java program, and delivers powerful features including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming.

groovy

Groovy has both a dynamic nature (supporting code styles similar to Ruby and Python) as well as a static nature (supporting styles similar to Java, Kotlin and Scala). The developers of Groovy aim to support and improve both those aspects of the language. In this release Groovy has been improved to better manage null values. You can use Groovy's null-safe navigation operator, piggy back on Java's Optional or provide a null-checking extension to the type checker. These are augmented in Groovy 3 with null-safe indexing for arrays, lists and maps and a new AST transformation @NullCheck for automatically instrumenting code with null checks.

Performance improvements have been gained by the use of more efficient type resolution during compilation.The addition of a Maven Bill Of Materials (BOM) allows more flexible usage of Groovy from other projects.

The new Parrot parser is described as more flexible and maintainable than the parser in previous versions of Groovy. It’s called the Parrot parser because in the early days of creating the parser, the goal was for the new parser’s output to be an exact echo of what the old parser produced. It has since been extended to support additional syntax options and language features.

Other improvements include support for Java’s class do/while loop, as well as  support for the more elaborate form of Java’s classic for loop with comma-separate expressions. Support has also been added for Java-style array initialization and for Lambda expressions.

groovy 

 

 

More Information

Groovy Website

Related Articles

Groovy Joins Apache

Groovy And Grails Lose Sponsor

New Groovy       

Gradle 2.0 Released       

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Open Platform For Enterprise AI Launched
18/04/2024

A new platform aimed at building and supporting an open artificial intelligence (AI) and data community has been launched.  The Open Platform for Enterprise AI (OPEA) was announced by The Linux F [ ... ]



Actionforge Releases GitHub Actions VSCode Extension
09/04/2024

Actionforge has released the beta of its GitHub Actions tool as a VS Code extension. The extension consists of a suite of tools making up a visual node system for building and managing GitHub Actions  [ ... ]


More News

Last Updated ( Monday, 17 February 2020 )