Duck Typing - in Statically Typed Languages

In Statically Typed Languages

Certain usually statically typed languages such as Boo and the version 4 release of C# have extra type annotations that instruct the compiler to arrange for type checking of classes to occur at run-time rather than compile time, and include run-time type checking code in the compiled output. Such additions allow the language to enjoy most of the benefits of duck typing with the only drawback being the need to identify and specify such dynamic classes at compile time.

Read more about this topic:  Duck Typing

Famous quotes containing the words statically and/or languages:

    The idea that information can be stored in a changing world without an overwhelming depreciation of its value is false. It is scarcely less false than the more plausible claim that after a war we may take our existing weapons, fill their barrels with cylinder oil, and coat their outsides with sprayed rubber film, and let them statically await the next emergency.
    Norbert Wiener (1894–1964)

    The very natural tendency to use terms derived from traditional grammar like verb, noun, adjective, passive voice, in describing languages outside of Indo-European is fraught with grave possibilities of misunderstanding.
    Benjamin Lee Whorf (1897–1934)