3 ms·
Well despite a few sentences like “remember, if statements are not all bad”, the author still makes a case that if statements are generally to be avoided. My p
by d--b 8y ago
Well despite a few sentences like “remember, if statements are not all bad”, the author still makes a case that if statements are generally to be avoided.
My point is that this in itself is bad advice.
Overuse of oop concepts is just as harmful (if not more) as overuse of if statements.
- meheleventyone 8y agoOveruse of anything is generally harmful (since it suggests doing too much of it) otherwise it would just be use! But I'm fairly convinced the author isn't saying that they are to be generally avoided, to quote directly: > If statements usually make your code more complicated. But we don’t want to outright ban them. I’ve seen some pretty heinous code created with the goal of removing all traces of if statements. We want to avoid falling into that trap.
- hellofunk 8y ago> Overuse of oop concepts is just as harmful The author's examples are not all about oop -- many of them having nothing to do with oop, they are just good advice for clean code in general.