News for hackers. Stuff that matters.
Re:The Anti-If Campaign by calambrac on Thursday June 25, 2009 @12:34PM (#673958)
In retrospect, my comment sounded like it was reaffirming the article's point, but that's really not how I meant it (snark fail on my part).

I agree with what you're getting at, and I think that the idea of popularizing "AntiIf" as a slogan is really stupid and dangerous. The first eager intern who suggests refactoring some code because "ifs are bad", I'm not a religious man, but God help them.

What I was trying to point out is that the single example they have up right now showing that 'if' is "bad" is dispatching on types, which a good number of languages support out of the box (in other words, it's a strawman). If you're already inspecting types, then they presumably already exist, so there's no additional overhead in using your language's features to get clearer code when you can.

There are no comments on this comment yet.