Hacker News new | ask | show | jobs
by seeknotfind 670 days ago
One reason programmers do this is so that they can make a one character change, e.g. "else if (1 === 1)" -> "else if (1 === 2)" in order to change the logic there. For C programers you see a lot of '#if 0' '#if 1' for this same purpose. Though, given that it's used everywhere, I'm not sure if it's really for that purpose.
1 comments

I’m a big fan of tacking on “&& false” or “|| true” as well.