Category:Typing/Compatibility/Duck: Difference between revisions

Added some explanatory text
m (categorize)
(Added some explanatory text)
 
(One intermediate revision by the same user not shown)
Line 1:
[[Category:{{feature|Typing/Compatibility]]}}
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.
More information on [[wp:Duck typing|Wikipedia]].
Anonymous user