2 ms·
Duck typing really only makes sense in the context of dynamic typing.
by jolux 7y ago
Duck typing really only makes sense in the context of dynamic typing.
- twistedpairs 7y agoThat's a given. That comment doesn't further the conversation in any way though?
- jolux 7y agoYou said it was a dynamic typing issue, not a duck typing one, when in fact the two are inseparable in the example you gave. That is absolutely an example of duck typing, you’re calling the same method on three different types with no subtyping relationship with a single invocation.