Skip to content
0:00 / 0:00

#jvm#lambda#invokedynamic

Lambdas in Java: A Peek Under the Hood • Brian Goetz • GOTO 2013

GOTO Conferences

1M subscribers • 115 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • A classic. People kept recommending it from 2017 to 2021.
  • Presented by Brian Goetz, Java Language Architect at Oracle

Advanced. Deep dive for people who know the field.

39K views12 years ago2 recommendations

Programming languagesSystems programmingJava and the JVMLanguage design and type systemsCompilers and interpreters

Brian Goetz explains how lambda expressions are implemented in Java 8 using the invokedynamic instruction rather than anonymous inner classes.

This presentation was recorded at GOTO Aarhus 2013. #gotocon #gotoaar gotocon.com Brian Goetz - Java Language Architect at Oracle ABSTRACT The big language features for Java SE 8 are lambda expressions (closures) and default methods (formerly called /defender methods/ or /virtual extension methods/). Adding closures to the language opens up a host of new expressive opportunities for applications and libraries, but how are they implemented? You might assume that lambda expressions are simply a more syntactically compact form of inner classes, but, in fact, the implementation of lambda expressions is substantially different and builds on the invokedynamic feature added in Java SE 7. This session illustrates the boundary where language design and JVM architecture meet and influence each other. TIMECODES Introduction Lambda expressions for Java Why lambdas for Java? Big question #1: typing Functional interfaces Big question #2: representation New bytecode tool: Method Handle Stepping back... Bytecode invocation modes New bytecode tool:invokedynamic Translation strategies Indy: the ultimate procrastination aid Indy: the ultimate lazy initialization Indy: the ultimate indirection aid Performance costs Performance example - linkage cost Performance example - capture cost Future VM support (?) Serialization Summary twitter.com/GOTOcon linkedin.com/company/goto- instagram.com/goto_con facebook.com/GOTOConferences #Java #Lambda #JavaSE8 #BrianGoetz CHANNEL MEMBERSHIP BONUS Join this channel to get early access to videos & other perks: youtube.com/channel/UCs_tLP3AiwYKwdUHpltJPuA/join Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at gotopia.tech Sign up for updates and specials at gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. youtube.com/user/GotoConferences/?sub_confirmation=1

Why it's here

2 people recommend this

What people say. Recommended as the definitive explanation of how Java lambdas are implemented at the JVM level.

Moments people linked to

u/SOberhoffin r/rust • Recommends

On “The highs and lows of Rust (2017)”

>Java 8 introducing lambda syntax (albeit compiled down to anonymous inner classes) Java lambda's are *not* compiled down to anonymous inner classes.
3View on Reddit

inactive-useron Lobsters • Recommends

Lambdas in Java: A Peek under the Hood (2013)