Re:Go's power is in emergent behavior
by dvirsky on Sunday April 27, 2014 @04:26PM
(#7656690)
BTW I don't think the compiler is "smart enough" - but the Http API has 2 (probably more) overloaded methods for each type you may want to pass to it. Go doesn't have method overloading by design. If that's something that is a must have for anyone, Go is simply not for them.
[ Parent
| on HN ]
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-transla...
But it behaves exactly as if there were little classes which implement interfaces. Just more efficient.