Covariance and Contravariance (computer Science) - Origin of The Terms

Origin of The Terms

The origin of these terms is in category theory, where the types in the type system form a category C, in which morphisms represent the subtype relationship.

Defining a function that accepts type p and returns type r creates a new type p → r in the type system; the new function name is associated with that type. This function definition operator is actually a functor F : C × C → C that creates the said type. From the substitution principle above, this functor must be contravariant in the first argument and covariant in the second.

Read more about this topic:  Covariance And Contravariance (computer Science)

Famous quotes containing the words origin of the, origin of, origin and/or terms:

    “In the woods in a winter afternoon one will see as readily the origin of the stained glass window, with which Gothic cathedrals are adorned, in the colors of the western sky seen through the bare and crossing branches of the forest.”
    —Ralph Waldo Emerson (1803–1882)

    “For, though the origin of most of our words is forgotten, each word was at first a stroke of genius, and obtained currency, because for the moment it symbolized the world to the first speaker and to the hearer. The etymologist finds the deadest word to have been once a brilliant picture.”
    —Ralph Waldo Emerson (1803–1882)

    “In the woods in a winter afternoon one will see as readily the origin of the stained glass window, with which Gothic cathedrals are adorned, in the colors of the western sky seen through the bare and crossing branches of the forest.”
    —Ralph Waldo Emerson (1803–1882)

    “An evident principle ... is the principle of justice to all peoples and nationalities, and their right to live on equal terms of liberty and safety with one another, whether they be strong or weak.”
    —Woodrow Wilson (1856–1924)