lambda binary snapshots
Brian Goetz
brian.goetz at oracle.com
Sat Nov 12 07:48:30 PST 2011
Good question. It is currently pretty limited. The compiler accepts interfaces with extension methods and enforces the typing rules, and emits correct class files. The VM support for inheriting behavior from interfaces is not there yet. But, we do have a prototype tool for simulating the VM behavior through bytecode weaving, and the build for this binary download runs this weaving tool on the JDK libraries, so that the few extension methods that are in the libraries behave correctly in the JDK classes. So, for example, the extension methods from Iterable will show up on JDK implementations of Iterable like ArrayList, but not on a custom user implementation of List (yet).
The weaving tool is open-source but not part of this binary distribution. We plan to post instructions for trying it out if you want to use extension methods in your own code.
On Nov 12, 2011, at 4:10 PM, Colin Decker wrote:
> Thanks for putting out these snapshots!
>
> To what degree are extension methods supposed to be working in this build?
> They seem to work for subclasses of Iterable, except those that were
> compiled with a previous version of Java, for which I get an
> AbstractMethodError. I also tried adding extension methods to an interface
> of my own... it compiles, but gives an AbstractMethodError as well.
>
> --
> Colin
>
>
> On Fri, Nov 11, 2011 at 12:27 PM, Maurizio Cimadamore <
> maurizio.cimadamore at oracle.com> wrote:
>
>> Dear lambditizens,
>> I'm glad to announce that the first binary snapshots of the lambda
>> repository are available at the following URL:
>>
>> http://jdk8.java.net/lambda/
>>
>> As you can imagine, as the implementation of the compiler/libraries is
>> still under heavy development, there are still many rough corners that
>> need to be polished. I'd like to thank you all for all the patience and
>> the valuable feedback provided so far - please keep it coming!
>>
>> I'd also like to thank Brian, Dan, Mike, Stuart and Mike for their
>> effort in making this happen.
>>
>> Enjoy.
>>
>> Maurizio
>>
>>
>
More information about the lambda-dev
mailing list