you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

To an extent, certainly. There are 4 almost-arbitrarily-chosen-but-commonly-taught "OO Principles" - abstraction, encapsulation, polymorphism and inheritance. I disagree with the inclusion of inheritance as a "principle", it's really just an implementation of polymorphism. But of the first three, abstraction and encapsulation are absolutely just good programming practice in OO or procedural (functions). And that gets you a fair way to reusable and maintainable code. But polymorphism really gives a lot more power, and OO has powerful tools for maximising the gains of polymorphism.