Advanced | Help | Encyclopedia
Directory


Duck typing

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. 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.








Links: Addme | Keyword Research | Paid Inclusion | Femail | Software | Completive Intelligence

Add URL | About Slider | FREE Slider Toolbar - Simply Amazing
Copyright © 2000-2008 Slider.com. All rights reserved.
Content is distributed under the GNU Free Documentation License.