2 ms·
Lots of extra comments here: https://lobste.rs/s/z17zyg/structured_programming_how_write_proper https://lobste.rs/s/z17zyg/structured_programming_how_write_...
by Kim_Bruning 6y ago
Lots of extra comments here:
https://lobste.rs/s/z17zyg/structured_programming_how_write_proper https://lobste.rs/s/z17zyg/structured_programming_how_write_...
Like several of the commenters there, I also think that early returns are actually a good pattern. (I also happen to think that throw and yield are perfectly fine. )
If you know that your method is never going to work out anyway today, abort immediately. Don't hang around!