You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Ben McCann (JIRA)" <ji...@apache.org> on 2019/06/05 20:43:00 UTC

[jira] [Created] (GROOVY-9157) Conflicting statements in Groovy 3.0 release notes

Ben McCann created GROOVY-9157:
----------------------------------

             Summary: Conflicting statements in Groovy 3.0 release notes
                 Key: GROOVY-9157
                 URL: https://issues.apache.org/jira/browse/GROOVY-9157
             Project: Groovy
          Issue Type: Bug
          Components: Documentation, parser-antlr4, release
            Reporter: Ben McCann


The release notes say that lambda expressions are turned into Groovy closures to support JDK7. It then later says that only JDK8+ is supported. Perhaps the strategy for lambda syntax should be reconsidered if we're now supporting only JDK8+? (I'm personally supportive of supporting only JDK8+)


*Java-style Lambda syntax*
The Java syntax for lambda expressions is now supported.

Note Experimental Status: While this feature will remain, we regard its current implementation as experimental. Currently, lambda expressions are turned into equivalent Groovy closures. An advantage of this approach is that it works even when using JDK7 (i.e. using Groovy 2.6 with Parrot parser enabled on a version 7 JRE) but it doesn’t easily enable the same level of type inference and checking that Java 8 offers even when using @TypeChecked or @CompileStatic and might be much less performant in a range of scenarios. We are currently exploring supporting native lambda expression either instead of, or in addition to, conversion to closures. If we change the implementation, most users would experience no behavioral differences in their programs though a native implementation would likely be faster but only work on JDK8+. Our goal is to clarify this aspect of the language before reaching release candidate status.

*JDK requirements*
Groovy 3.0 requires JDK9+ to build and JDK8 is the minimum version of the JRE that we support.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)