4 ms·
In Go any type can implement interfaces. A type doesn't declare which interfaces it implements.
by mseepgood 5y ago
In Go any type can implement interfaces. A type doesn't declare which interfaces it implements.
- masklinn 5y agoThat doesn't seem like a relevant objection? If structs support generic methods but interfaces don't then nothing happens, everything just works as you'd expect (whithin those limitations). A method which isn't part of the interface is not under consideration, so the generic methods have no bearing on the interfaces the object could or would implement. The reverse would be an issue, but this is not.