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 pr in the type system; the new function name is associated with that type. This function definition operator is actually a functor F : C × CC 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)

    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)

    The essence of morality is a questioning about morality; and the decisive move of human life is to use ceaselessly all light to look for the origin of the opposition between good and evil.
    Georges Bataille (1897–1962)

    We are well advised to keep on nodding terms with the people we used to be, whether we find them attractive company or not. Otherwise they turn up unannounced and surprise us, come hammering on the mind’s door at 4am of a bad night and demand to know who deserted them, who betrayed them, who is going to make amends. We forget all too soon the things we thought we could never forget.
    Joan Didion (b. 1934)