News for hackers. Stuff that matters.
Re:Toward Go 2 by jdmichal on Thursday July 13, 2017 @02:46PM (#14763997)
Absolutely correct. Lambdas are just shorthand for anonymous inner classes which implement an interface with only one method -- aka single abstract method (SAM) types.

For instance, you have two functions. One takes `Function<Type, Type>` and the other takes `UnaryOperator<Type>`. Giving the "same" lambda to both functions will result in two anonymous inner types, one implementing both interfaces.

Re:Toward Go 2 by _asummers on Thursday July 13, 2017 @03:43PM (#14764500)
They're not exactly shorthand. They use `invoke_dynamic` under the hood, which defers the creation of the lambda til it is used. Conceptually they are, but in practice they're a little different.
Re:Toward Go 2 by slaymaker1907 on Thursday July 13, 2017 @10:31PM (#14766988)
Lambdas are also more aggressively optimized. If possible, the compiler will sometimes turn a lambda into a static method.