contravariance

名词 n.

英文释义

名词 n.
  1. The reversal of the order of data types acted upon by an operator. countable,uncountable
    — 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. A functor which reverses composition. countable,uncountable
  3. Of vectors, the property of scaling inversely with a change of basis, as opposed to covariance. countable,uncountable

词形变化

词汇关系

相关词

词源

Etymology tree
Proto-Indo-European *ḱe?
Proto-Indo-European *ḱóm
Proto-Italic *kom
Proto-Italic *kom-
Proto-Indo-European *-teros
Proto-Italic *-teros
Proto-Italic *komterosder.
Proto-Italic *komterād
Latin contrābor.
English contra-
English variance
English contravariance
From contra- + variance.
0 次浏览 数据来源: Wiktionary