Hiding the lambda proxy frame
forax at univ-mlv.fr
Tue Jun 11 14:43:27 PDT 2013
On 06/11/2013 11:35 PM, Brian Goetz wrote:
so for a non serializable lambda, the compiler can use the name of the
used for the capture conversion if available.
The cost is that the compiler needs to be smarter.
An additional benefit can be a better* toString().
* I know, we haven't decided to have meaningful toString
> 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
>>>> (or lambda$myRunnable0, ..., if there is a collision) if it's
>>>> I think we already discuss about something like that in the light of
>>>> 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
>> Name stability is only needed when serializing a lambda, right ?
More information about the lambda-spec-experts