The best thing about object oriented programming is Polymorphism, (ie executing different code depending on the type…

The best thing about object oriented programming is Polymorphism, (ie executing different code depending on the type of the data).

The other other two “pillars” of OOPs are of more dubious value. Encapsulation encourages bad patterns of state management and mutation. Inheritance is just a flawed approach to composing code for reuse. The best approach to inheritance is to use it very sparingly.

3 thoughts on “The best thing about object oriented programming is Polymorphism, (ie executing different code depending on the type…

  1. When I am making code for me, I use functional programming. When I am making code for money, I use OOP, because that’s what they want. Unless they say they don’t care, in which case I use functional.

    Like

Leave a reply to Ross Hartshorn Cancel reply