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


Angular and Wiz To Merge
27/03/2024

Two web development frameworks used at Google are merging. One, Angular is open source and widely known, while the other, Wiz, is an internal web framework developed and used by Google for some o [ ... ]



Conference Times Ahead
29/03/2024

Following a well-established pattern both Google's and Microsoft's Developer Conferences will take place in May while Apple follows on in June. Here are the dates plus what to expect.


More News

Last Updated ( Monday, 17 February 2020 )