David Morales

In computer programming, an object is usually suitable based on its type. For instance, we cannot use a string type to sum numbers, but we can do lots of other actions suitable for strings.

On the other side, duck-typing does not define an object by its type, but by the methods and properties it has. So, if the dog in the image has a duck beak (property) and it quacks (method), then it is not a dog, it is a duck. This is called…