Hiding the lambda proxy frame

Remi Forax forax at univ-mlv.fr
Tue Jun 11 14:34:08 PDT 2013

On 06/11/2013 07:23 PM, Brian Goetz wrote:

>> He raises a good point that the compiler translation should try to
>> provide a better name.
>> By example,
>>    Runnable myRunnable = () -> System.out.println("hello");
>> should result in a lambda that instead to be called "lambda$0",
>> instead the compiler should try to name it something like 
>> lambda$myRunnable
>> (or lambda$myRunnable0, ..., if there is a collision) if it's possible.
>> I think we already discuss about something like that in the light of
>> serialization,
>> but not in the stack trace context.
> We did discuss this in the stack trace context at least once, but 
> apparently we never converged.  And the two problems interact; things 
> that enhance readability sometimes come at the expense of name stability.

Name stability is only needed when serializing a lambda, right ?


More information about the lambda-spec-experts mailing list