Thread: OOP is... bad?!

  1. #1
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738

    OOP is... bad?!

    I just stumbled upon this video on youtube, I'm having mixed thoughts about it... What is your opinion?

    https://www.youtube.com/watch?v=QM1iUe6IofM
    Devoted my life to programming...

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    OO is bad, m'kay

  3. #3
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    45 minutes? Jesus H. Christ. Fail at communication. New acronym: TL;DW.

    Anyway, most likely bull......... OOP might add some overhead and be difficult at times, but the benefits outweigh the drawbacks IMO. Code reusability and readability.

    I like the first comment on the video:

    I am an average craftsman of the trade.
    I hate OOP. I hate Java.
    And I hate people in general.
    Specifically I hate tech bloggers, that try to be edgy but just end up riding the mainstream.

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Specifically I hate tech bloggers, that try to be edgy but just end up riding the mainstream.
    wew lad

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Epy View Post
    Anyway, most likely bull......... OOP might add some overhead and be difficult at times, but the benefits outweigh the drawbacks IMO. Code reusability and readability.
    You may want to watch the whole video then. There's very little of BS in it and it goes right down to the real problems in OOP that even the die hard adopter will recognize, although probably never admit.

    After 25 years of doing OOP, sometimes right, sometimes wrong, sometimes wrong because I or the language sucked, other times right because I made a real effort to do it canonically, there is one thing I learned Epy. OOP not even once made my life easier, not even once made my code more readable and, especially, not even once made my code easy to maintain. The best way to do OOP is to do it wrong, and the video hints at you why. When you do it canonically, you are bound to a world of pain, of multiple classes with ridiculous abstractions that actually don't hold any state at all (objects that aren't really, or objects with state that serve only as artificial complements to how OOP functions) and that complicate your objects graph down to a point it becomes seemingly impossible to follow both the program structure or its execution path.

    And it took me 25 years to understand how miserable my life has been. Fooled by the prevalent idea that OOP is a natural way of expressing data and intent, charmed by some of its core principles of encapsulation, and blinded by powerful IDE features that facilitate OOP development like object browsers or auto-completion, I wasn't seeing that none of what I was doing made any sense at all. All it takes for you to understand what an actual mess OOP really is is to just do it on a text editor, away from the technological tricks that are there to hide its real nature from you. Or to try to follow a written program without using an object browser.

    OOP really is that charming mermaid that is going to eat you alive. And even you, I'm pretty sure, have wondered once or twice about it and have had more than once a nagging feeling that something is deeply wrong about the way you have been programming. As I slowly moved back into procedural programming out of necessity (not because at the time I could see anything wrong about OOP), I started to realize how f... up OOP is. And the sad thing, it took me actually quite a while to get back on track. OOP really has a tendency to make you unlearn all you knew about procedural programming. Contrariwise to what a good paradigm should be, OOP wants to prevail above any other paradigm.

    EDIT: Something you need to consider about OOP; the larger your program is, less and less of your code will be written around your actual real-life objects and their methods and more and more of it will be written around all the meta-programming necessary to force OOP into making your code do what you want it to do. As a result less and less of your code execution path touches the actual data your want to manipulate. This can't be the right way to program! I can see OOP as merely small and self-contained chunks of code in an otherwise procedural code base. But I refuse to ever again touch a language that enforces OOP at the core of its semantics.
    Last edited by Mario F.; 03-31-2016 at 08:32 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Mario, you make a lot of great points, and I think your reasons for not liking OOP, and in fact, those of the guy in the video, are exactly the reasons why C++ is such a powerful and useful language. A multi-paradigm language programmer can harness the best parts of all of the paradigms his/her tools support.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

Popular pages Recent additions subscribe to a feed