3 ms·
I'm wondering how easily Groovy will retrofit Java 8 lambdas when they come out. Groovy uses syntax {a,b-> a++;a+b} for closures, whereas Java 8 uses synt
by vorg 13y ago
I'm wondering how easily Groovy will retrofit Java 8 lambdas when they come out. Groovy uses syntax
{a,b-> a++;a+b}
for closures, whereas Java 8 uses syntax
(a,b)->{a++;a+b}
Also Groovy uses delegates to make its closures dynamically scoped, whereas Java 8 uses lazy evaluation for its lambdas.
They're incompatible, both syntax and semantics.
- blktiger 13y agoAccording to the Roadmap, they are planning on retrofitting Java 8 syntax in Groovy 3.