duck typing
duck typing noun: a style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface.
Noun
duck typing (uncountable)
- A style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface.
- Ruby proponents call this duck typing::^([sic]) if the variable responds to a message that asks it to quack like a duck and it quacks, it must be a duck. This is clearly different from the way that Java (and other strongly typed languages) work, […]2006, Neal Ford, Scott Davis, No Fluff, Just Stuff Anthology: The 2006 Edition, page 16
Origin of duck typing
From the so-called duck test: “if it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.”
Questions about duck typing
- What does duck typing mean?
- Duck typing means a style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface.
- What part of speech is duck typing?
- Duck typing is a noun.
Words near duck typing in the dictionary
Source and license
Adapted from Wiktionary: duck typing (page history and authors). Text available under the Creative Commons Attribution-ShareAlike 4.0 license. Word.ws reformatted the entry and added links. Wiktionary data of 2026-09-02.
Last updated:
Cite this entry: “duck typing.” Word.ws, https://word.ws/duck_typing. Based on Wiktionary, CC BY-SA 4.0.
