Hacker News new | ask | show | jobs
by Hendrikto 20 hours 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.

1 comments

That is the classic answer for how to do that in pre-generics Go. It doesn't solve the problem I mentioned.