First draft of translation document

Howard Lovatt howard.lovatt at gmail.com
Sun May 23 17:36:16 PDT 2010


If you look at the class D example in:

http://mail.openjdk.java.net/pipermail/lambda-dev/2010-May/001364.html

It shows multiple captures using a frame object that also contains the lambda.

As an aside the main difference in the alternate translation is that
it only contains one object, the frame object, that does both the
variable capture and is itself the lambda. The other translation has
two objects, one to capture the frame and one for the lambda.

On 21 May 2010 01:03, Nathan Bryant <nathan.bryant at linkshare.com> wrote:
>
>
> Howard wrote:
> [snip]
>
> ...
>>
>>private static class Frame_1 extends Frame1<String> implements
> Callable0V {
>>  Frame_1( final String s ) { super( s ); }
>>
>>  public Void _call() { _call0V(); return null; }
>>  public void _call0V() { System.out.println( _e1 ); }
>>}
>
> Not much different from an inner class. This example does not describe
> what to do about multiple closures in the same scope.
>
> With regard to the recent proposals, the advantages of interface
> injection are clear. I do not see any clear advantage to MethodHandle
> with bind for partial application (but maybe I'm just missing something)
>



-- 
  -- Howard.


More information about the lambda-dev mailing list