出典:Wiktionary
出典:『Wiktionary』 (2026/06/01 16:51 UTC 版)
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.”
duck typing (uncountable)
出典:Wikipedia
出典:『Wikipedia』 (2011/07/04 13:22 UTC 版)
In computer programming with object-oriented programming languages, duck typing is 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. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see below), which may be phrased as follows: