里氏替换原则

Let ${\displaystyle q(x)}$ be a property provable about objects ${\displaystyle x}$ of type ${\displaystyle T}$. Then ${\displaystyle q(y)}$ should be true for objects ${\displaystyle y}$ of type ${\displaystyle S}$ where ${\displaystyle S}$ is a subtype of ${\displaystyle T}$.

参见

• SOLID - “SOLID”中的 L 指代了里氏替换原则

引用

1. ^ Liskov, Barbara. Data abstraction and hierarchy. 1987-10-04 [2008-03-23].