First draft of translation document

Gernot Neppert mcnepp02 at
Tue May 18 00:01:48 PDT 2010

Interesting to see the various possibilities of converting lambda
expressions into callable Java objects!

I wonder why the approach from paragraph 6.2 (Translation as inner
class) is not also viable for paragrah 5 (stateless functions).
Paragrah 5 relies on the assumption:

"Additionally, we assume that the MethodHandle class will be extended
to provide a method asSam(Class sam) which will provide an optimized
form of injecting a SAM interface into a method handle."

At the end of the day, doesn't that mean that an anonymous proxy class
will be created anyway?
In what respect will your approach be superiour to simply generating
code for a static inner class, such as:

private static Block<T> $sam$1= new Block<T>() {
   public void invoke(String s){

More information about the lambda-dev mailing list