Object-Oriented Programming  —  The Trillion Dollar Disaster

https://medium.com/better-programming/object-oriented-programming-the-trillion-dollar-disaster-%EF%B8%8F-92a4b666c7c7
OOP is considered by many to be the crown jewel of computer science. The ultimate solution to code organization. The end to all our problems.

This article argued that in many cases it is far from it.

IT was supposed to improve code organization, but the bitter truth according to this article is that OOP fails at the only task it was intended to address. It looks good on paper – but Instead of reducing complexity, it encourages promiscuoussharing of mutable state and introduces additional complexity with its numerous design patterns. OOP provides developers many tools and choices, without imposing the right kinds of limitations.
Some might disagree with the article conclusions, but it raises many good points to consider.
Using OOP is seemingly innocent in the short-term, especially on greenfield projects. But what are the long-termconsequences of using OOP?

C++ is a horrible [object-oriented] language… And limiting your project to C means that people don’t screw things up with any idiotic “object model” c&@p.
— Linus Torvalds, the creator of Linux

10 Comments

  1. Tomi Engdahl says:

    Lafore’s book emphasizes that “OOP” is only useful for larger and complex programs. It is said in every OOP book (also in Lafore’s book) that procedural paradigm is prone to errors e.g. the global data as easily vulnerable by the functions. It is said that programmer can make honest errors in procedural languages e.g. by making a function that accidentally corrupts the data.
    https://cs.stackexchange.com/questions/22867/what-problems-of-procedural-programming-does-oop-solve-in-practice

    Reply
  2. Tomi Engdahl says:

    Functional Programming Doesn’t Work (and what to do about it)
    https://prog21.dadgum.com/54.html

    The kicker is that what’s often a tremendous puzzle in Erlang (or Haskell) turns into straightforward code in Python or Perl or even C.

    Reply
  3. Tomi Engdahl says:

    Was object-oriented programming a failure? (2015)
    https://news.ycombinator.com/item?id=13850210

    Reply
  4. Tomi Engdahl says:

    Your Code: OOP or POO?
    https://blog.codinghorror.com/your-code-oop-or-poo/

    I’m not a fan of object orientation for the sake of object orientation. Often the proper OO way of doing things ends up being a productivity tax. Sure, objects are the backbone of any modern programming language, but sometimes I can’t help feeling that slavish adherence to objects is making my life a lot more difficult.

    Reply
  5. Tomi Engdahl says:

    Are all mainstrean programming paradigms a big series of failures or success?

    When procedural programming was seen as problematic then came object oriented programming (OOP) was tried as solution? But that is also seen by many as failure when programmers trying to write proper OOP code end up just producing poo. And there is also functional programming with it’s promises and failures. And there has been also trials with
    declarative programming, Reactive Programming, etc.. and new rising “stars” in AI, cloud and quantum fields.

    Reply
  6. Anja Jepsen says:

    Thank you for sharing this insightful post! I found the information you provided
    to be both valuable and engaging. Your expertise on the topic shines through, and I appreciate the effort you put into delivering such high-quality content.
    Looking forward to reading more from you in the future!
    Anja Jepsen

    Reply

Leave a Reply to Tomi Engdahl Cancel reply

Your email address will not be published. Required fields are marked *

*

*