Hiding the lambda proxy frame

Brian Goetz brian.goetz at oracle.com
Tue Jun 11 10:23:58 PDT 2013

> Moreover, offline, one of my friend point me to a presentation of Jamie
> Allen
> http://jaxenter.com/what-you-need-to-know-about-lambdas-by-jamie-allen-47356.html

Note also that those slides show that we have some errors in our line 
number here?

> 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.

More information about the lambda-spec-experts mailing list