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


Liberica Alpaquita Containers Now Come With CRaC
23/04/2024

Bellsoft has added CRaC support to its ready-to-use Alpaquita container images. This will enable developers to seamlessly integrate CRaC into their projects for performant Java in the Cloud.



Hydraulic Atlas Bows Out, Welcome Electric Atlas
21/04/2024

Boston Dynamics dismayed us at the beginning of the week with a video that suggested was discontinuing Atlas, its humanoid robot. Fast forward a day and its successor was unveiled. Designed to be even [ ... ]


More News

Last Updated ( Monday, 17 February 2020 )