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, origin and/or terms:

    The real, then, is that which, sooner or later, information and reasoning would finally result in, and which is therefore independent of the vagaries of me and you. Thus, the very origin of the conception of reality shows that this conception essentially involves the notion of a COMMUNITY, without definite limits, and capable of a definite increase of knowledge.
    Charles Sanders Peirce (1839–1914)

    Someone had literally run to earth
    In an old cellar hole in a byroad
    The origin of all the family there.
    Thence they were sprung, so numerous a tribe
    That now not all the houses left in town
    Made shift to shelter them without the help
    Of here and there a tent in grove and orchard.
    Robert Frost (1874–1963)

    Books have their destinies like men. And their fates, as made by generations of readers, are very different from the destinies foreseen for them by their authors. Gulliver’s Travels, with a minimum of expurgation, has become a children’s book; a new illustrated edition is produced every Christmas. That’s what comes of saying profound things about humanity in terms of a fairy story.
    Aldous Huxley (1894–1963)