[ovirt-devel] Slides for the Java 8 presentation yesterday
Martin Mucha
mmucha at redhat.com
Wed Dec 2 09:53:50 UTC 2015
Thanks Juan, I've read your slides and learn something new from them.
And I'd like to ask one small thing about how lambdas are represented. It seems that from early draft there were 'some changes' — from inner class representation, to runtime generated inner class representation, to no classes in the end. So if spec says, that [quote]:
The value of a lambda expression is a reference to an instance of a class with the following properties:
• The class implements the targeted functional interface type and, if the target type is an intersection type, every other interface type mentioned in the intersection.
…
and in current implementation class type of lambda is now it's enclosing class type, it means, that lambda is represented by instance of class its defined in(this instanceof <enclosing class> in lambda returns true). Then it seems that enclosing type has to implement functional interface to fulfill spec. Which seems wild, provided, that with two 'Runnable-representing' lambdas enclosing class has to implement Runnable twice, with two different implementations, which is usually impossible.
as you know more about this subject, can I ask you to confirm this statements / explain where I'm wrong and how it works internally / or explain what kind of sorcery is going on here?
thanks,
Mar.
----- Original Message -----
> Thanks Juan for the great presentation !!
>
> On Wed, Dec 2, 2015 at 10:50 AM, Juan Hernández < jhernand at redhat.com >
> wrote:
>
>
> Hello all,
>
> The slides for the Java 8 new features that I delivered yesterday are
> available here:
>
> https://jhernand.fedorapeople.org/java8/slides.html
>
> There is no recording, as hangout failed and I forgot to record the
> BlueJeans call, sorry.
>
> Regards,
> Juan Hernandez
> --
> Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
> 3ºD, 28016 Madrid, Spain
> Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>
>
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
More information about the Devel
mailing list