DEV Community

Discussion on: How to Get Rid of Annoying IFs Forever

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

While there may be some good ideas here, I'm concerned that this is going to promote "Real Programmers Use Butterflies"-flavored overengineering. I've seen countless atrocities committed in the name of eliminating perfectly reasonable if statements.

But then, one should be wary of anything stated as "<x> Considered Harmful". It's almost always either (1) an overbroad generalization based on a specific problem, or (2) an attempt to promote the latest Clever Solution™.

The author may say, "Well, no, I'm not really advocating getting rid of all if statements", but if that's the case, the title and article structure aren't a responsible or accurate reflection of the point, even to the brink of being guilty of "clickbait".

Collapse
 
mcsee profile image
Maxi Contieri

Thank you, Jason

I'm aware of over engineering and overbroad generalization. That's why the article has a counterexample on it and warns against abuse.

Title is a bit clickbait. But the word 'annoying' has two meanings
1) All the Ifs are annoying and should all be removed.
2) We need to remove JUST the annoying ones.

The article's spirit is the second one.

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

I figured as much, but you have to consider how your readers MIGHT perceive it. Skimming is prevalent, and this doesn't skim the way you'd want.

Thread Thread
 
mcsee profile image
Maxi Contieri

Certainly I'll edit the conclusion to stress this out.

Thank you for your feedback!