How is duck typing different from the old 'variant' type and/or interfaces?
问题 I keep seeing the phrase "duck typing" bandied about, and even ran across a code example or two. I am way too lazy busy to do my own research, can someone tell me, briefly: the difference between a 'duck type' and an old-skool 'variant type', and provide an example of where I might prefer duck typing over variant typing, and provide an example of something that i would have to use duck typing to accomplish? I don't mean to seem fowl by doubting the power of this 'new' construct, and I'm not