4 ms·
Providing a protocol with a default concrete implementation of the interface? That's not passing code review here. Would I have caught the bug? Probably not. B
by delinka 8y ago
Providing a protocol with a default concrete implementation of the interface? That's not passing code review here.
Would I have caught the bug? Probably not. But it looks like bad form to me to provide that default implementation to Greeter, so please rewrite your code.
- sharp11 8y agoI’m curious to know why... Looks like typical mixin pattern, no?
- HNLogInShit 8y agomix-in
- delinka 8y agoAn interface declaration is not the right place for implementation. If you want a default implementation, use a base class and inherit, overriding if you don't want the default. This bug is now another good reason not to use default implementations on interfaces.