A deep dive into how Java 8 lambda expressions work under the hood, based on a talk by Brian Goetz (JSR 335 spec lead). Covers why function types were rejected in favor of functional interfaces, why inner classes and method handles were unsuitable for runtime representation, and how invokedynamic was used to create a deferred 'lambda factory' approach via the lambda metafactory. Includes performance comparisons between lambdas and inner classes across linkage, capture, and invocation costs, showing lambdas are 8–24% faster at linkage and excel in multi-threaded non-capturing scenarios.
Sort: