On 19.10.2016 09:09, Cédric Champeau wrote:
First of all, great work, Daniel ! I'm confident that making the
"lambdas" be "closures" in Groovy is enough.

I think it won't be enough for :: and MethodClosures. Actually, Daniel, are those supported in the new Grammar and what are they mapped to?

I stated it in the past but
I'm going to repeat myself here, I don't think having 2 syntax for
"closures/lambdas" with slightly different semantics would help our
users/language.

They should have the semantics of Closure, then it is probably good.

That said, the static compiler can do better, doing
escape analysis, and using "real" lambdas when the target bytecode is 8,
as an optimization.

In Groovy 3 I do plan to make out Closures behave similar to lambdas. Of course with the additional problem of Closure not being a functional interface... well... let's not get started on MOP2 here ;)

bye Jochen

Reply via email to