Data Type - Duck typing


Duck typing determines the suitability of an object by the presence of methods and properties, rather than the actual type of the object as in typing.

Duck typing is where type checking is deferred until runtime—when reflection capabilities are used to ensure correct behavior.

We find duck typing in many languages today, including Java, Python, Common Lisp, Go, Groovy, Objective-C, and PHP.


Powered by ComboStrap