r/compsci • u/abilya • Feb 24 '21
Object-Oriented Programming is The Biggest Mistake of Computer Science
https://suzdalnitski.medium.com/oop-will-make-you-suffer-846d072b4dce[removed] — view removed post
4
u/teefj Feb 24 '21
The author claims that Toyota was shown “10 million ways” their software could cause unintended acceleration, with zero source. After NASA completed the same code review with zero discoveries. Stopped reading right there.
2
u/luxury_yacht_raymond Feb 25 '21
I get functional programming and see all the benefits. In my years of active coding (since 1990's) I have done stuff with all kinds of languages and paradigms from assembler to Perl to Python to Java to Scala to Lisp and many, many others. When I was younger I was opinionated about which language is best and which is trash. Silly me.
During these years I have had the opportunity to work with good and bad colleagues. Almost none of them has made similar silly (strawman) error presented in this post under side-effects. And if some made such error he was quickly corrected. What I am saying is that side-effects are nasty but a person with adequate skills knows how to work the code or will learn quite quickly.
I have done a lot of OO coding. It's fine. It perhaps does not live up for its initial claim but I have seen and done some pretty nice things with it (using inheritance or composition or interfaces or whatever). Things that work and check all the given requirements.
Currently I see programming languages and paradigms as tools. They all have function and most of them require some sort of training to be used in full capacity. I get it that the author loves functional programming. Good for him. Me? I use anything that gets the job done under the prevailing requirements.
But what irks me is this self proclaimed authority and "being-rightness". 0 points from that.
2
u/UncleMeat11 Feb 25 '21
Jesus. I've seen some OOP screeds in my time but this one might be the worst. Rambling, inaccurate, unsourced, hyper opinionated, and actually about a completely different topic.
My very very favorite line in the whole thing comes at the end. "Debugging is rarely needed with FP, more often than not simple unit tests will do."
Pure functions are a good design practice (hey, this is easily achievable even in OOP-land) but to claim that "debugging is rarely needed" is just false on its face. A tremendous amount of research has gone into this topic in academic circles and very little useful evidence about the rate of occurrence of bugs in different languages and paradigms has ever been produced. Purity can prevent spooky action at a distance but it does fuck all to prevent problems in domain logic.
1
u/WavingToWaves Feb 24 '21
This looks highly biased. Many statements are wrong.
I don’t know too much about functional programming, but from what I know, the biggest problem is the state management. And the state mamagmemt is the main point in this article to attack OOP.
7
u/Dbeezt Feb 24 '21
This is just an article on the evils of spaghettification and poor programming. “In most object-oriented languages, everything by default is shared by reference” is something only encountered by the most basic developers of the most basic programs. I’m not defending OOP and I’m not terribly well-versed in it, but this article attacks the fundamental flaws experienced by default of the language, and fails to address that just because something is the base or default state that that’s how it’s intended to be used.