6 ms·
You can already define functions that work on every type that implements Foo, no? I've never coded in go, but I thought that was the whole point of interfaces.
by sgeop 11y ago
You can already define functions that work on every type that implements Foo, no? I've never coded in go, but I thought that was the whole point of interfaces.
And I don't see how adding generics would solve the problem of being able to add a FooImpl2 to a slice of FooImpls. Java has generics and they don't allow covariant generic collections for this same reason.