|
|
|
|
|
by rprospero
879 days ago
|
|
I had always heard that the "single exit" focus on "break" and "continue" was a misunderstanding. When wild GOTOs roamed the earth, with was common for a subroutine to end by jumping to a new part of the code, with the jump location being different depending on conditionals within the code. The "single exit" commandment was that a subroutine should always exit back into the routine that had called it. That makes it less an injunction against a function having early returns and more a rejection of continuation passing style. |
|