Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: v_borchert@despammed.com (Volker Borchert) Newsgroups: comp.lang.java.programmer Subject: Re: Java 8 closures vs. anonymous inner classes Date: 4 Dec 2013 23:45:27 GMT Organization: Private site at Eddersheim, Germany Lines: 26 Distribution: world Message-ID: References: X-Trace: individual.net s5jDtX09XEm8b5jMwkJqlwyOUGuupdq96jJ1nlgR1wf/vRUA99 Cancel-Lock: sha1:bp044WUA+wT2aO5XhIi4xvHD+no= Xref: csiph.com comp.lang.java.programmer:26731 Sven K??hler wrote: > When I was digging through the byte code, invokedynamic was simply used > to invoke some fancy method that would basically encapsulate the > creation of the lambda object (which then is nothing more than an > instance of some class that implements the interface in question). > So obviously, all some magic happens here - but the magic is pretty much > limited to some a bunch of things that may likely speedup the creation > of lambda objects. > > My point being: after creating the object representing the lambda > object, everything is as it was before, even the performance I guess. When I dug through the byte code, I had the impression that there was more to it. I didn't understand all the details because neither eclipse nor jad were capable of handling them correctly. There was some method handle trickery, but no obvious hidden class. > Certainly. And the implementation of it all is probably pretty ugly too! For values of "pretty" approximately equal to aleph 7. -- "I'm a doctor, not a mechanic." Dr Leonard McCoy "I'm a mechanic, not a doctor." Volker Borchert