groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russel Winder <>
Subject Re: About the native-lambda branch
Date Fri, 12 Jan 2018 17:54:46 GMT
On Fri, 2018-01-12 at 05:54 -0700, Daniel.Sun wrote:
>     As you see, the latest implementation is to generate method for lambda
> at the class generation stage, in addition new inner classes will be
> generated for each lambda.
> […]

I haven't read the code, I am reacting to the above paragraph a bit out of
context. Nonetheless…

The whole point of Java lambdas and use of invokedynamic is to avoid any
classes at all, so the mention of using an inner class worries me. The
anonymous inner class route was tried and rejected in favour of runtime code
generation triggered via an ignoredynamic – I do not know the full details,
hopefully I am not wrong.

The point here is for me, Groovy should use the same strategy as Java for what
is a Java feature.

Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w:

View raw message