4 ms·
Go has interfaces that you implement just by having the methods, without declaring that you're implementing the interface (e.g. "implements" in Java). How well
by Teckla 13y ago
Go has interfaces that you implement just by having the methods, without declaring that you're implementing the interface (e.g. "implements" in Java).
How well does that work with tooling? For example, in Java, I frequently ask my tools, "Give me a list of classes that implement this interface," and I expect a fast and -- most important -- 100% accurate answer.
My instinct is that Go's approach makes it tooling-unfriendly (a good chance of false positives, especially in large systems), but perhaps I'm missing something.
- redbad 13y ago> in Java, I frequently ask my tools, "Give me a list of > classes that implement this interface," You don't generally ask this question when working in Go, because you don't really construct your "type" system in these terms.