3 ms·
Java also has labeled loops. Such that I have used it before. Not nearly as easy to abuse as goto statements.
by taeric 5y ago
Java also has labeled loops. Such that I have used it before. Not nearly as easy to abuse as goto statements.
- dan-robertson 5y agoJava needed labelled loops because it deliberately did not include goto, so I don’t really see the argument. If you have goto then you don’t need labelled loops (this is a much less bad argument than ‘if you have goto you don’t need any other control flow’ as using labelled loops and using goto are similar) but it might be scary to have all the freedom of it.
- taeric 5y agoMy point was that there is later evidence in language implementation that labeled loops aren't that dangerous.