User Tools

Site Tools


principles:liskov_substitution_principle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
principles:liskov_substitution_principle [2013-06-15 15:38] – [Context] 94.217.39.37principles:liskov_substitution_principle [2021-09-02 18:26] – old revision restored (2021-05-11 22:03) 65.21.179.175
Line 26: Line 26:
 ===== Rationale ===== ===== Rationale =====
  
 +Let ''P'' and ''Q'' be types and ''Q'' a subtype of ''P''. If LSP is not adhered to, there is an operation accessible through the interface of ''P'' which behaves differently when called on ''Q''. So code which is written in terms of ''P'' will not expect the behavior and will not work as desired.
 ===== Strategies ===== ===== Strategies =====
  
principles/liskov_substitution_principle.txt · Last modified: 2021-10-18 21:50 by christian