Covariance and contravariance: conflict without a cause

  • Giuseppe Castagna
Part of the Progress in Theoretical Computer Science book series (PTCS)

Abstract

In this chapter we expand the discussion started in Section 4.6.4. We argue that covariance and contravariance appropriately characterize two distinct and independent mechanisms. The so-called contravariance rule correctly captures substitutivity, or the subtyping relation (that establishes which sets of codes can replace in every context another given set). Instead, a covariant relation characterizes the specialization of code (i.e., the definition of new code that replaces the old one in some particular cases).

Keywords

Covariance Assure Dispatch 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Birkhäuser Boston 1997

Authors and Affiliations

  • Giuseppe Castagna
    • 1
  1. 1.CNRS, LIENSParisFrance

Personalised recommendations