JEP 302: Lambda Leftovers

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Dec 7 09:44:27 UTC 2016



On 07/12/16 08:37, Remi Forax wrote:
> I really appreciate this proposal,
> i hit both better disambiguation and shadow of lambda parameters issues quite frequently.
>
> For treatment of underscores,
> as i understand, the idea is that you can use '_' as parameter without having '_' being entered in the scope of the method,
> i.e. this code will not compile:
>
>    void setBar(Bar _) {
>      foo(_);
>    }
Exactly - '_' is not a variable name - just a placeholder you can use in 
a variable declaration in lieu of a variable name.

Maurizio
> cheers,
> Rémi
>
> ----- Mail original -----
>> De: "mark reinhold" <mark.reinhold at oracle.com>
>> À: "maurizio cimadamore" <maurizio.cimadamore at oracle.com>
>> Cc: platform-jep-discuss at openjdk.java.net
>> Envoyé: Mercredi 7 Décembre 2016 00:50:02
>> Objet: JEP 302: Lambda Leftovers
>> New JEP Candidate: http://openjdk.java.net/jeps/302
>>
>> - Mark



More information about the platform-jep-discuss mailing list