Lambda Expressions Backported to Java 7, 6 and 5
forax at univ-mlv.fr
Wed Jul 24 09:09:43 PDT 2013
On 07/24/2013 04:24 PM, Brian Goetz wrote:
> Nice work. It was part of the design process to enable a mechanism like this; it is nice to see this proven and satisfying to see that it was so simple to implement.
> There will in fact be a small change to the metafactory API before GA.
> Sent from my iPad
Yes, nice work.
I think your code will work with the new metafactory protocol too,
because you read the bootstrap arguments in a generic way (using
There is a release of ASM (ASM5_ALPHA) that supports the Java 8 bytecode but
this version is not available on maven central.
I really like the way you capture the emitted bytecode of the classes
generated by the lambda metafactory,
it's a really nice hack but as you said it only works if the metafactory
generate one class by callsite,
something that may be not true in the future.
> On Jul 24, 2013, at 4:40 AM, Esko Luontola <esko.luontola at gmail.com> wrote:
>> Hi all,
>> Thought you might want to know about this:
>> And thanks for developing the lambdas. :)
>> I would just like to know that what is the probability for the
>> implementation of LambdaMetafactory or InnerClassLambdaMetafactory being
>> changed before the GA release of JDK 8?
>> Currently Retrolambda relies on the fact that LambdaMetafactory
>> dynamically generates exactly one class per each invocation of
>> LambdaMetafactory's methods. Also it relies on the naming pattern of the
>> generated lambda class and the synthetic methods in the class containing
>> the lambda. If any of those implementation details change, I'll have to
>> update Retrolambda.
>> Esko Luontola
More information about the lambda-dev