3 ms·
> the fact you cannot define custom methods for external types in Go Just wrap them. The external type is theirs. Make your own wrapper and do whatever you lik
by Hendrikto 2mo ago
> the fact you cannot define custom methods for external types in Go
Just wrap them. The external type is theirs. Make your own wrapper and do whatever you like with it.
People want every language to adapt to them, instead of adapting themselves to the language.
- cyphar 2mo agoThat is the classic answer for how to do that in pre-generics Go. It doesn't solve the problem I mentioned.