Hiding the lambda proxy frame

Brian Goetz brian.goetz at oracle.com
Tue Jun 11 14:35:16 PDT 2013


On 6/11/2013 5:34 PM, Remi Forax wrote:
> 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 ?
> Rémi

More information about the lambda-spec-experts mailing list