Java Magazine, Mar/Apr 2018
Groovy 30 Whats Coming One of the most popular JVM languages adds handy new features ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 61 jvm languages Groovy has always been easy for Java developers to learn partly because the language syntax is a natural extension and simplification of Java and partly because virtually all Java syntax also compiles in Groovy In fact its sometimes an amusing demo to simply change a Java class to Groovy by changing the file name from java to groovy and watching it compile without problems While the result might not be idiomatic Groovy the demo shows how easy it is to port code from one language to the other This situation changed with the introduction of JDK 8 because Java added syntax for lambda expressions and method references that dont fit the Groovy model While Groovy supplies closures where Java expects lambdas it was considered unfortunate that the complete set of Java syntax no longer can be compiled in Groovy Along with other improvements in Groovy 30 with the introduction of the new Parrot parser Java syntax once again works in Groovy Groovy 30 is in alpha at the moment specifically 300 alpha 1 The release notes show the direction the core team is taking and feedback is welcome This article reviews many of the new features and examines some existing features of Groovy that you might not know about Version Numbers Groovy is an Apache project which means it follows a semantic versioning scheme That is the first number is the major version the number after the first dot is the minor version and bug fix versions come after the second dot As of early 2018 the current stable version of Groovy is 24 and the latest point release is 2413 The 24 line is stable and efective but there are major changes coming soon KEN KOUSEN
You must have JavaScript enabled to view digital editions.