3 ms·
Second that. I disagree with the premise that such code is hard to understand. On the contrary: when done well, early returns pop your mental stack and free up
by kieckerjan 8y ago
Second that. I disagree with the premise that such code is hard to understand. On the contrary: when done well, early returns pop your mental stack and free up mental resources when reading code. (I guess I am a bit extreme. I even advocate judicious use of goto's in C code, for instance for cleaning up state after an error or for writing out FSM's without the distracting fluff of loops and switches.)