3 ms·
It looks weird at first, but it's great when used like so: return x unless err return y if condition ... return z Keeping all of your "return"
by TrevorBurnham 15y ago
It looks weird at first, but it's great when used like so:
return x unless err
return y if condition
...
return z
Keeping all of your "return"s at the start of the line makes it much easier to see, at a glance, what the possible return values of your function are. (And, of course, when you see a "return" in the middle of your function, you know there must be a condition attached.)