Random
Source Code

duck typing

Programming stuff.
If that thing can be throw into your oven and taste like a roast duck or whatever, and it lucks has wings and legs and ankles, that is a duck.
duck typing focus on the acts or the method but don't care what this thing actually is.

Jack: look at that bird, it can swim, it has two wings, it must be a DUCK.
Ben: That is a goose. Nerd. Stop duck typing.

by DDDooordddy November 11, 2018


duck typing

In computer programming with object-oriented programming languages, duck typing is a layer of programming language and design rules on top of typing. Typing is concerned with assigning a type to any object. Duck typing is concerned with establishing the suitability of an object for some purpose. With normal typing, suitability is assumed to be determined by an object's type only. In duck typing, an object's suitability is determined by the presence of certain methods and properties (with appropriate meaning), rather than the actual type of the object.

When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. You are duck typing that bird :V

by Hedgehog1973 March 22, 2016