3 ms·
If you have to declare any sort of is-a or is-a-like relationship to be a duck, then it's not duck typing. Reason being: without the declaration, you can quack
by kazinator 7y ago
If you have to declare any sort of is-a or is-a-like relationship to be a duck, then it's not duck typing. Reason being: without the declaration, you can quack all you want, but you are not substitutable for a duck. Duck typing means that the presence of suitable properties and behaviors alone determine substitutability, not the is-a relationship.