5 ms·
The lambdas aren't actually lambdas, they are anonymous classes with a single metthod according to the type-inferred interface, and they can't use variables tha
by mishafb 5y ago
The lambdas aren't actually lambdas, they are anonymous classes with a single metthod according to the type-inferred interface, and they can't use variables that aren't effectively final.
- gpderetta 5y agoThat's just a way to make them work in the existing ecosystem (in C++ lambdas for example are just function objects with overloaded operator()). The final is to avoid some mistakes, but they are still effectively closures.