3 ms·
> Implicit interfaces are the single best part of Go. Help me understand this. The concern raised by the author regarding method signatures versus method contr
by rcoveson 9y ago
> Implicit interfaces are the single best part of Go.
Help me understand this. The concern raised by the author regarding method signatures versus method contracts seems valid, and I have a hard time envisioning where implicit interfaces would be useful. Do you just hope to get lucky? Somebody, without knowing about the interface, would have to use all the same parameters and return types, the same method name, and implement the contract in a compatible way for it to work, right?
- andrewprock 9y agoImplicit interfaces reduces compile time dependencies. One of the original target features of Go was that it wouldn't take forever to compile Google-scale programs, like C++ does.
- stouset 9y agoGP claimed that this feature is the "single best part of Go".