Duck typing

This article needs to be cleaned up to conform to a higher standard of quality.
See How to Edit and Style and How-to for help, or this article's talk page.

Duck typing is a humorous way of describing the type non-checking system typical of some programming languages where, as with Smalltalk, the variable value itself determines what it can do. The name combines two metaphors, both to make a serious point, and to make a joke.

One could say that the language "ducks" the issue of typing. Initially coined by Dave Thomas in the Ruby community, its premise is that (referring to a value) "if it walks like a duck, and talks like a duck, then it is a duck". Duck typing also refers to the concept in some languages that as long as an object implements a certain interface, it is interchangeable with any other object that implements the same interface, no matter whether the two have a related inheritance hierarchy.

Missing image
Gnome-system.png


 This computer language-related article is a stub. You can help Wikipedia by expanding it.

See also: Duck typing, Computer language, Datatype, Programming language, Ruby programming language, Smalltalk programming language