|
|
|
|
|
by lubutu
5019 days ago
|
|
And yet backward goto is extremely useful. Consider this Java, redo: while(true) {
for(Item x : xs)
if(f(x))
continue redo;
break;
}
With goto, redo:
for(Item x : xs)
if(f(x))
goto redo;
Most people seem at first to balk at the goto, even though they're functionally identical, and the goto is much clearer and less error prone... |
|
Btw, in Ruby there are two keywords that are basically backward gotos: redo and retry.