News for hackers. Stuff that matters.
Re:Inheritance Often Doesn't Make Sense by jdmichal on Saturday March 17, 2018 @03:57PM (#16608762)
As niklasjansson points out, this solution breaks Liskov substitution. Squares programmed in such a way are no longer substitutable for rectangles. Breaking Liskov substitution is a great way to hide bugs and make your codebase extremely hard to reason about, due to the fact that every subtype can have drastically different behavior than what's defined by the parent type.

There are no comments on this comment yet.