First draft of translation document

Howard Lovatt howard.lovatt at gmail.com
Wed May 19 17:34:16 PDT 2010


Comments in-line

On 19 May 2010 00:22, Neal Gafter <neal at gafter.com> wrote:
> On Tue, May 18, 2010 at 1:43 AM, Howard Lovatt <howard.lovatt at gmail.com> wrote:
>> It is good to see a draft of how lambdas might be implemented, I think
>> that it makes it easier to discuss some issues and also clarifies some
>> parts of the specification.
>>
>> An alternative to using MethodHandles is to use a Callable interface
>> and then use inner classes to capture the 'frame';
>
> Do you mean like section 6.2 of Brian's document?

Similar but using an interface instead of a Method Handle and putting
all the transformation inside a single frame, so that only one object
is created per lambda

> The VM does not "support" inner classes.  Rather, inner classes are a
> language construct implemented by compiler "magic".  Inner classes are
> translated by javac into ordinary (static) classes, with additional
> fields representing captured state and enclosing instances.  Brian's
> document describes the translation of lambdas to primitives supported
> by the VM.

Sure - it is just a convenient way to express the transformation. I
was assuming that everyone was familiar with this.

  -- Howard.


More information about the lambda-dev mailing list