[–] frou_dh 13y ago ↗ FWIW, I gather that contemporary Go docs have stopped using the phrase "duck typing" because it has too much of a dynamic connotation to convey what Go in fact does ("structural typing"). [–] enneff 13y ago ↗ Correct. An io.Reader doesn't just look and sound like a Reader. It _is_ a reader. [–] marshray 13y ago ↗ If it looks like duck typing, and it sounds like duck typing, ... that's good enough for duck typing.
[–] enneff 13y ago ↗ Correct. An io.Reader doesn't just look and sound like a Reader. It _is_ a reader. [–] marshray 13y ago ↗ If it looks like duck typing, and it sounds like duck typing, ... that's good enough for duck typing.
[–] marshray 13y ago ↗ If it looks like duck typing, and it sounds like duck typing, ... that's good enough for duck typing.
3 comments
[ 290 ms ] story [ 1152 ms ] thread