Subtyping
A FORM OF TYPE POLYMORPHISM
Subtypes; Subtyping (object-oriented programming); Supertype; Subtype and derived type; Interface inheritance; Subtyping of functions; Subtype (computing); Inclusion polymorphism; Subtyping polymorphism; Subtype polymorphism
In programming language theory, subtyping (also subtype polymorphism or inclusion polymorphism) is a form of type polymorphism in which a subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability, meaning that program elements, typically subroutines or functions, written to operate on elements of the supertype can also operate on elements of the subtype. If S is a subtype of T, the subtyping relation (written as , ,Copestake, Ann.