3 ms·
That's because the return statement is a kind of goto statement. Goto-like statements reduce the value of structured programming. In a pure structured program,
by augustk 9y ago
That's because the return statement is a kind of goto statement. Goto-like statements reduce the value of structured programming. In a pure structured program, each statement sequence is either completely executed or not executed. There are also pure structured languages, like Oberon, which doesn't allow impurely structured programs.
- maxxxxx 9y agoWhen return is used in the middle of a complex code sequence I much prefer a goto so at least I know where all paths exit.