News for hackers. Stuff that matters.
Re:“No-else-after-return” considered harmful by neilc on Sunday August 30, 2009 @11:16PM (#795348)
What is the distinction between those two situations? (i.e. those in which the article "concedes the point"?)
Re:“No-else-after-return” considered harmful by nkurz on Monday August 31, 2009 @12:09AM (#795411)
Presuming this is a genuine question: the difference is whether one goes on to do more work after the 'guard' return, or whether one is just choosing which value to return.

I think the style guide is being silly, and there is no simple rule that says "always use an else" or "never use an else". I'd see "Avoid unnecessary indentation" as a better rule.

Re:“No-else-after-return” considered harmful by philwelch on Monday August 31, 2009 @12:50AM (#795456)
One's an early return due to error, one's a conditional return value.