2 ms·
No, it's exactly as tomp says - in Java 8, lambda expressions are handled by compiling them to little classes which implement interfaces. Kind of. The truth is
by twic 13y ago
No, it's exactly as tomp says - in Java 8, lambda expressions are handled by compiling them to little classes which implement interfaces.
Kind of. The truth is that something absolutely barking mad goes on in the compiler, and then extra magic is injected at runtime:
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html http://cr.openjdk.java.net/~briangoetz/lambda/lambda-transla...
But it behaves exactly as if there were little classes which implement interfaces. Just more efficient.
- dvirsky 13y agoOh, thanks for the info, didn't know that. Still I don't think that Go should have that feature.