3 ms·
Sorry, I don't fully understand what you mean by that. Are "early returns" easier to miss when reading code (easier to miss than goto statements achieving the s
by ketzu 4y ago
Sorry, I don't fully understand what you mean by that. Are "early returns" easier to miss when reading code (easier to miss than goto statements achieving the same effect)? If that was your intended meaning (sorry I am missing some sleep today) I don't share that view, I think both statements are equally obvious in that regard.
Examples I was thinking about:
* an early return can only go back to the call-site
* all returns in a function or method return to the same place
* an early return terminates the context it is in
* an early return does not create an entry point for nearly arbitrary other code points as labels for gotos do