3 ms·
> Which means you can declare an interface that foreign packages already conform to, and then freely use them. Except that it is very difficult to find out whi
by azth 11y ago
> Which means you can declare an interface that foreign packages already conform to, and then freely use them.
Except that it is very difficult to find out which struct implements what interface, you'd have to go look through the code. Not to mention there is always the possibility of accidentally implementing an interface. This has already caused real issues it seems (there was a blog post about it).
There already exists a solution for this issue, via typeclasses.
But golang doesn't have generics.