DUCK TYPING
\dˈʌk tˈa͡ɪpɪŋ], \dˈʌk tˈaɪpɪŋ], \d_ˈʌ_k t_ˈaɪ_p_ɪ_ŋ]\
Sort: Oldest first
-
A term coined by Dave Thomas for a kind ofdynamic typing typical of some programming languages, suchas Smalltalk, Ruby or Visual FoxPro, where avariable's run-time value determines the operations thatcan be performed on it.The term comes from the "duck test": if it walks like a duckand quacks like a duck, it must be a duck.Duck typing considers the methods to which a value respondsand the attributes it posesses rather than its relationshipto a type hierarchy. This encourages greater polymorphismbecause types are enforced as late as possible. (http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/100511).
By Denis Howe