28/10/2013
About Duck Typing (http://en.wikipedia.org/wiki/Duck_typing)
Ruby says: "When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck."
Java replies: "If it walks like a duck and quacks like a duck, it could be a dragon doing a duck impersonation. One may not always want to let dragons into a pond, even if they can impersonate a duck."
In computer programming with object-orientedprogramming languages, duck typing is a style of typing in which an object's methods and properties determine the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers...