Duck Typing as a Heuristic

Osayame Gaius-Obaseki
2 min readMar 2, 2015

--

Computer programmers smile widely when you start discussing duck typing. Duck typing, as a method of typing, ignores an element’s type, and focuses only on what the object can do. Put differently, in a system that uses duck typing, the computer checks whether an object can do something, instead of whether it is of a particular type. Duck typing diverges from other typing methods which rely on knowing the object’s type or the type which it is based on.

Duck typing stems from James Whitcomb Riley’s phrase: “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.” For a programmer if an object in the program can quack, then it is a duck, for the purposes of the program. Even if the object is actually a cow or a chicken, it does not matter, as long as it can quack. Traditionally, they typing system would need to know, beforehand, that the object was actually a duck, or a child (inheritor) of the duck object i.e. an Australian Spotted.

Duck typing, outside the computing context (in its most strict sense) strikes me as a lens through which the world can be interpreted. Often we make decisions about people based on their lineage or type, instead of what they can do. Type, here, could refer to their ethnicity, religion, or formal education. This typing is especially important in the hiring process. Instead, I think, duck typing should be the mode for analysis.

Duck typing primarily focuses on the individual’s ability to perform a particular task. For example, an individual may not be American or from an Ivy League, however that typing should be irrelevant if they can program a Unix compiler. The latter is the method (akin to quacking) that they can perform. This sort of merit-based typing has flaws, of course, but gestures towards an equitable approach to typing and decision-making during the hiring process, and decision-making writ-large.

In the future, I plan to explore duck typing in other contexts. Particularly, I am interested in duck typing’s implications when we consider notions of race and authenticity.

--

--