Anonymous user
Category:Typing/Compatibility/Duck: Difference between revisions
Category:Typing/Compatibility/Duck (view source)
Revision as of 16:44, 29 August 2009
, 14 years agoAdded some explanatory text
m (categorize) |
(Added some explanatory text) |
||
(One intermediate revision by the same user not shown) | |||
Line 1:
A [[wp:Duck typing|typing scheme]] commonly used by dynamic languages.
:''If it walks like a duck and quacks like a duck, I would call it a duck.''
For example, with [[:Category:Typing/Compatibility/Structural|structural typing]] a “get the <tt>x</tt> element of a structured type” operation will only apply to one type (or its subtypes), but with duck typing it will apply to ''any'' structured type that has such an element. It is common for duck-typed languages to use [[:Category:Typing/Checking/Dynamic|dynamic typing]] too.
|