4 ms·
We were taught "one entry, one exit". I now think of the early part of a function as a filter for bad params, invalid state & whatnot, and return as early as p
by rukuu001 9y ago
We were taught "one entry, one exit".
I now think of the early part of a function as a filter for bad params, invalid state & whatnot, and return as early as possible.
Code just feels less complex that way.