Covariance and contravariance (computer science): Difference between revisions

Content deleted Content added
Formal definition: Resolve clarification needed by switching to same notation used in body. Also add sentence to explicitly define the notation.
Tag: nowiki added
Adding local short description: "Programming language concept", overriding Wikidata description "subtyping property of a generic type in a programming language"
Line 1:
{{Short description|Programming language concept}}
{{Type systems}}
Many [[programming language]] [[type system]]s support [[subtyping]]. For instance, if the type {{C sharp|Cat}} is a subtype of {{C sharp|Animal}}, then an expression of type {{C sharp|Cat}} [[Liskov_substitution_principle|should be substitutable]] wherever an expression of type {{C sharp|Animal}} is used.