1. (object-oriented programming) The reversal of the order of data types acted upon by an operator.
    cot en
    • 2005, Jesse Liberty, Visual C# 2005: A Developer's Notebook, "O'Reilly Media, Inc." (ISBN 9780596552947), page 47 ↗:
      I get why with covariance I can return a Dog (a Dog is a Mammal), but why does contravariance work the other way? Shouldn't it accept a derived type when it expects a base type? Contravariance is consistent with Postel's Law: […]
  2. (category theory) A functor which reverses composition.
Related terms Translations
  • French: contravariance
  • Portuguese: contravariância
  • Russian: контрвариация

This text is extracted from the Wiktionary and it is available under the CC BY-SA 3.0 license | Terms and conditions | Privacy policy 0.023
Offline English dictionary