3 ms·
Either I'm completely misunderstanding you, or you are not reading my words. Specifically you've just replied to this whole paragraph that addresses what you ar
by undecisive 6y ago
Either I'm completely misunderstanding you, or you are not reading my words. Specifically you've just replied to this whole paragraph that addresses what you are saying completely:
> 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"
Please quote me the bit where I say that I "downvote other ideas because they (the ideas) are dangerous” - I said very clearly that I downvote answers that are dangerous.
An answer is a concrete expression of an idea, but an idea can be correct without the answer being correct. (an extreme example: "We should improve the overall health of our nation" might be a completely valid idea, yet "shoot the disabled" is a completely wrong answer that embodies that idea but takes it in absolutely the wrong direction.)
> Yet you’ve done nothing to explain such an extreme and unreasonable point of view.
Alright, let's flip it: "Functional Programming is dangerous". I can use FP to write a program that accidentally wipes a hard disk. Therefore FP is dangerous. Argue against that.
Functional Programming, when used correctly, mitigates some of the dangers of Object Orientation. Arguably, a correctly written Object Oriented module should not be any less safe than a module correctly written in a Functional style.
You can argue (and probably do) that the implementations of Functional Programming that you enjoy using make writing correct code easier. And that is a valid statement.
But saying "OOP is dangerous" is no more valid than saying "FP is dangerous". Saying "Haddock are slimy and disgusting which is why I prefer Cod". No, fish are slimy and disgusting, and these are both fish. Maybe there are degrees by which some fish are slimier than others, but that doesn't justify an out-of-context vilification of Haddock.
So let me tell you some things that are more dangerous to your code and project than OO:
- Using a language or paradigm that your team are not familiar with
- Using tools that force you to distance your variable and method names from the domain-specific words that the specification is written in
- Premature optimisation
- Following every new framework and fad that comes along.
So yes, it is extreme and unreasonable to categorically state that "OOP is dangerous".
As an answer, it deserves to be downvoted.
As an idea, it has merit and deserves to be explored and justified and compared.
In a place of ideas (like Hacker News) that statement is perfectly acceptable (if not entirely helpful)
In a place of answers (like Stack Overflow), it is misleading and dangerous in that it encourages far more dangerous behaviours.