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)

    People in places many of us never heard of, whose names we can’t pronounce or even spell, are speaking up for themselves. They speak in languages we once classified as “exotic” but whose mastery is now essential for our diplomats and businessmen. But what they say is very much the same the world over. They want a decent standard of living. They want human dignity and a voice in their own futures. They want their children to grow up strong and healthy and free.
    Hubert H. Humphrey (1911–1978)