Re:“No-else-after-return” considered harmful
by naz on Sunday August 30, 2009 @10:12PM
(#795267)
Just use whatever seems clearer
[ Parent
| on HN ]
Re:“No-else-after-return” considered harmful
by akkartik on Sunday August 30, 2009 @11:39PM
(#795376)
Yep. Use else when the two branches do symmetrical amounts of work. Don't use else if one is an early return.
If you find this discussion interesting you're probably stuck with codebases with overly long functions. My commiserations.