3 ms·
> There is no need to use GOTO when a language has functions/procedures and exceptions. The usual example of when goto saves more trouble than it causes is bre
by msla 5y ago
> There is no need to use GOTO when a language has functions/procedures and exceptions.
The usual example of when goto saves more trouble than it causes is breaking out of a nested loop early. You can avoid goto in that scenario with a sufficient number of flags, but flag-heavy code tends to be harder to read than a couple apposite gotos. Even better is Perl-style named blocks, though.