Subtyping, Subclassing, and Trouble with OOP

http://okmij.org/ftp/Computation/Subtyping/

 

In the article, the author claims that OOP is not a good way to program since a class that extends another can break the  Liskov Substitution Principle. Meaning, it can break existing code, even when the implementation seems sound. The solution is FP.

 

(Please don't take it that I personally think that OOP is bad, just posting this article as something disruptive to think about)

 

Warning: the article contains C++ code...

 

 



Share this article: