3 ms·
(love the fact that this comment was downvoted! Sorry for the effect that has on your karma though) The dangerous part is presuming that no good software can c
by undecisive 6y ago
(love the fact that this comment was downvoted! Sorry for the effect that has on your karma though)
The dangerous part is presuming that no good software can come from OO. A comment like "I would prefer to see this in a functional paradigm, with as few side effects as possible" is absolutely fine.
The statement that all OO is bad makes an absolute out of a subjective, rubbishes the work and effort of millions and may cause a relative beginner to ignore learning a paradigm that is fundamental to their growth and learning as a developer.
Now then, that said... if you wanted an argument over avoiding OOP, I would argue any statement that categorically says "Avoid X" is an oversimplification. Everything is a balance of strengths and weaknesses, and there are times when OO is the right tool for the job. You are welcome to disagree, and I wouldn't downvote you for doing so _in this context_, but in a Stack Overflow context, depending on how you say it, I very well might if I considered your words dangerous enough.
(i.e. Silver bullets kill more than just werewolves)
- bostonsre 6y agoIt seems lame to downvote due to a debatable disagreement. It stomps out unpopular ideas in a forum where they should be allowed and discussed/debated. I don't agree with the viewpoint that OOP should be avoided, but I would like to hear why some people are opposed to OOP.
- undecisive 6y agoAgain, I agree, but only in context. On Hacker News, I totally agree that downvoting debatable views that are expressed poorly is totally unnecessary. If it isn't a statement that is outright dangerous or intentionally hurtful, my bar for downvoting here is very high. I would trust the audience to discern for themselves. On Stack overflow, you are essentially there to teach people something. "Don't ever do X" is not going to teach something. Unpopular ideas (and even some popular ones) should be backed up with cogent reasoning, and I think downvoting (with an explanation) is the best way to tell future visitors "this is (probably) not the answer you are looking for".
- mlthoughts2018 6y agoYou did not explain how this is dangerous whatsoever. What about all those companies or teams out there using exclusively functional programming and succeeding? Their own experience would be evidence that avoiding OOP is good (as it has been good, demonstrably, for them). If they merely spoke from their own experience and attested to the good things that demonstrably came from avoiding OOP, you would consider that dangerous? That’s a ridiculous perspective. Again, it’s totally fine to disagree with them, and make solid counterpoints if you can, but calling them dangerous is completely ludicrous. This makes you sound like a narrow OOP zealot who gets cranky when people point out the truth that any use case solvable by OOP is also solvable with at least equal quality and equal satisfaction of the constraints using functional programming. Again, merely disagreeing is one thing, and raising pros vs cons of some specific OOP design. But to call it dangerous to suggest OOP may never be needed is just completely unreasonable. I question your understanding of the concept “dangerous” in that case, and if it were up to me, you’d lose downvote privileges treating people like that and misrepresenting their sincere, evidence based software ideas with a derogatory term like “dangerous.”
- undecisive 6y ago> You did not explain how this is dangerous whatsoever. What about all those companies or teams out there using exclusively functional programming and succeeding? Their own experience would be evidence that avoiding OOP is good (as it has been good, demonstrably, for them). If they merely spoke from their own experience and attested to the good things that demonstrably came from avoiding OOP, you would consider that dangerous? I can't tell whether you're intentionally building a straw-man here. My original example of a downvotable comment had three statements: "object orientation is dangerous": It clearly isn't. Badly written object oriented software can be dangerous, and you can argue that OO languages could do more to promote safety within themselves, but that doesn't make OO as a theoretical construct a bad thing, or all OO code bad, or all OO developers wrong. "you must write C++ using functional paradigms": Again, there are separate challenges when writing fully FP-style C++, certainly there is nothing to say you MUST write C++ that way. And many projects would probably not welcome you rewriting their codebase in that way. If someone goes back to their employer / open-source project / teachers and tells them they are doing it wrong because their code contains OO, they may well be laughed out of the door. "it's the only way to make good programs": This is obviously a lie. Then, look at the context - I said "answers that are dangerous, vulnerable, misleading, or represent an extreme viewpoint as fact (...)" - I intended the above three statements to be an example of the latter, I figured that people can easily imagine dangerous / vulnerable / misleading SO posts themselves. But yes, while I do consider there to be dangerous effects from stating a subjective viewpoint as an absolute like this, I do think that the above statements take a reasonable yet subjective statement like "Few pieces of advice have served me as well as [avoid OOP]" into a totally unreasonable objective statement "it's the only way to make good programs" Also, take a look at my later statement "Everything is a balance of strengths and weaknesses, and there are times when OO is the right tool for the job." I thought it would be relatively clear from this that there must always be times where OO is not the right tool for the job. My original statement was not an attempt to bad-mouth FP. But telling beginners to never use X because it's evil for whatever reason does have its dangers, whether that paradigm is FP or OOP. > any use case solvable by OOP is also solvable with at least equal quality and equal satisfaction of the constraints using functional programming. I suspect games programmers and kernel devs might disagree with that. But even if not, I would say that the bar you have set is terribly low. To my mind, a good program should also be readable, expressive, and in keeping with the project's coding standards. Generally, that's where I find that even some well-written FP code may fall down. But again, that's not an argument against FP itself, because I would not argue against FP. As I said before... > A comment like "I would prefer to see this in a functional paradigm, with as few side effects as possible" is absolutely fine. In fact, I would go as far as to say I might even agree with that statement. I certainly wouldn't downvote it. Sure, I'd like to see better arguments about why the side effects in that case are a problem, and why FP might be able to improve the code. But that is a perfectly valid and true statement. But hopefully now you can see why that statement is materially different to "object orientation is dangerous, you must write C++ using functional paradigms, it's the only way to make good programs".