Introduction

John C Reynolds
John C. Reynolds
TLDR: The idea of contravariance and covariance in physics and math is usually a statement about how something (for example, a vector) transforms with respect to a specified group of transformations (i.e., the group of rotations, for example). Category theory (*) abstracts and generalizes the concept, and this allows it to be applied to computer language design, for the simple reason that computer language design is often expressed in algebraic (and hence categorical) terms.


* Using Category Theory to Design Implicit Conversions and Generic Operators -- John C. Reynolds, 1980