You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.6 KiB

Object-Oriented Programming

Object-oriented programming (OOP, also object-obsessed programming) is a programming paradigm that tries to model reality as a collection of abstract objects that communicate with each other and obey some specific rules. While the idea itself isn't bad and can be useful in certain cases, OOP has become extremely overused and downright built into programming languages which often force users to apply this abstraction to every single program which creates anti-patterns, unnecessary issues and of course bloat. We therefore see OOP as a cancer of software development.

Ugly examples of OOP gone bad include Java and C++ (which at least doesn't force it). Other languages such as Python and Javascript include OOP but have lightened it up a bit and at least allow you to avoid using it.

You should learn OOP but only to see why it's bad (and to actually understand 99% of code written nowadays).

Principles

Why It's Shit

  • For simple programs (which most programs should be) OOP is an unnecessarily high and overly complex abstraction.
  • Great number of the supposed "features" and design-patterns (setters/getters, singletons, inheritance, ...) turned out to actually be anti-patterns and burdens.
  • OOP as any higher abstraction very often comes with overhead and performance loss as well as more complex compilers.
  • The relatively elegant idea of pure OOP didn't catch up and the practically used OOP languages are abomination hybrids of imperative and OOP paradigms.
  • TODO

History