Substitutability

From Wikipedia, the free encyclopedia

Substitutability is a principle in computer programming. It states that, if S is a subtype of T, then objects of type T in a computer program may be replaced with objects of type S (i.e., objects of type S may be substituted for objects of type T), without altering any of the desirable properties of that program (correctness, task performed, etc.).

This principle is often used in object-oriented computer programming.

[edit] See also


Languages