Subtyping

A value of a subtype can be substituted for a value of a supertype.

Related concepts:  TypePolymorphismInheritance

Closest Wikipedia entry:  Subtyping — In programming language theory, subtyping (also called subtype polymorphism or inclusion polymorphism) is a form of type polymorphism. 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 S <: T, S ⊑ T, or S ≤: T ) means that any term of type S can safely be used in any context where a term of type T is expected.

Misconceptions about Subtyping
11 documented Misconceptions

No known JavaScript misconceptions for this concept

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.