3 ms·
multiple return statements should be avoided. It makes the code harder to read. One entry, one exit.
by chasd00 9y ago
multiple return statements should be avoided. It makes the code harder to read. One entry, one exit.
- make3 9y agothis is not uniformly true. Scripting languages like Python where you usually don't need to clean up dynamically allocated objects actually suggest early return as part of their official style guides.