News for hackers. Stuff that matters.
Re:IF-less programming by jeremiep on Friday December 28, 2012 @08:53AM (#4977650)
My take on why ifs are "bad" is that they are statements, just like for, while, switch and others. Being statements they can't be composed as you would do with expressions.
Re:IF-less programming by dragonwriter on Friday December 28, 2012 @12:38PM (#4978539)
That's not universally true; there are languages where if is an expression rather than a statement (e.g., Ruby.)
Re:IF-less programming by ufo on Friday December 28, 2012 @01:21PM (#4978761)
Most languages have a ternary if operator like (?:). I don't see how this is such a big issue.