21 ms·
Aside from the accurate response that the signature needs to match, you must understand that Go's type system is deliberately a meld of a very strict type syste
by nknighthb 13y ago
Aside from the accurate response that the signature needs to match, you must understand that Go's type system is deliberately a meld of a very strict type system, and tools that allow you to beat it into a form of duck typing.
It's trying to merge the best parts of two very different worlds. A modest loss of safety is therefore tolerated.
- NateDad 13y agoHonestly, it's only a loss of safety if you randomly throw types you don't understand into functions you don't understand. And actually... most of the time this will do exactly what you want it to do, especially if you're talking about io.Writer and io.Reader.