Re:Two Things About Conditionals in JavaScript
by peterhunt on Monday December 10, 2012 @10:28PM
(#4902891)
I don't dispute that your argument has merit, but I disagree. An early exit from a function is an instance of "flat is better than nested" -- that is, it's often easier on the brain to not have to keep track of different layers of nesting. I often use early exits just to get rid off edge cases so the rest of my (non-nested) function can just deal with the "normal" case.
[ Parent
| on HN ]