It's a trade off, desugaring lambdas has several drawbacks, the main one being 
the desugared class being not unloaded even if the lambda instance is no more 
accessible.
Also, it takes more space on disk, and captured values are not considered as 
really final by the JIT.

You gain a faster startup (usually, it depends how it's desugared exactly) and 
you do not need a VM that supports invokedynamic*.

Rémi
* but given that string concatenation in 9, records and pattern matching in the 
future will also use invokedynamic, at some point your VM will need to support 
invokedynamic.

----- Mail original -----
> De: "Martin Buchholz" <[email protected]>
> À: "Claes Redestad" <[email protected]>
> Cc: "core-libs-dev" <[email protected]>
> Envoyé: Mercredi 13 Décembre 2017 21:17:30
> Objet: Re: [10!] RFR: 8193471: Startup regression due to JDK-8185582

> fyi Google does some automated desugaring for lambdas using a program named
> ... desugar.

Reply via email to