Ask HN: Is there a clear, mature discussion of OOP/functional tradeoffs?
My current perception is that it's primarily bandwagon mentality promoting the above viewpoint. For instance, I was reading an article purporting to explain what object-oriented programming 'really' is, and they cited as part of their motivation for bringing this up the wildly popular "Goodbye, Object Oriented Programming"[0]; and while the first article was not what I would call a particularly deep discussion of the nature of OOP, the popular article it referenced (with 44k upvotes) was just laughably unsophisticated, uninformed, and rhetoric-laden. Every point he put forward had such a simplistic rebuttal that I had to wonder if he was intentionally setting up straw-men or just didn't know better.
So now it's on my mind: "is this the sort of thing folks are reading which has given them the idea that OOP has been disproven as effective?"
Now I feel motivated to take a close look at the issue if there is a serious, well-informed dissection of the efficacy of OOP for modern developers. It would especially be valuable if instead of vaguely referring to inadequacies it also pointed out how alternate paradigms more successfully deal with specific points.
My current suspicion is, regarding OOP vs. functional: both can be used well or poorly, so a lot of it just comes down to the developer's ability to exploit their features—and the rest just depends on the domain you're trying to model. For instance, if that domain deals with a bunch of things that look and interact like objects, then OOP will probably be better; if it's mostly a complex, abstract computation, functional would be better.
[0] https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53
4 comments
[ 2.6 ms ] story [ 19.5 ms ] threadSo I don't really care about FP ideology or OO ideology. I'll pick the tools that best let me get my work done. If that offends purists, that's their problem.
As to your actual question, a reasonable, unbiased discussion of tradeoffs... sorry, no, I don't have one.
My opinion is that things like purity, immutability, type checking, and other FP characteristics are incredibly helpful, and they make me write code with fewer bugs.
https://www.codenewbie.org/blogs/object-oriented-programming...
[0] https://twitter.com/ryanbrush/status/999982149901021184