Why continue is not allowed outside iteration statements

Michael Day mikeday at yeslogic.com
Tue Nov 25 21:40:51 PST 2008


> Yes, you're right here. But why not write
> 'label: while (true) { ... continue label ...; break; }', to make it
> clear that there is an iteration?

Yes, this would be clearer.

> Forward jumps are less problematic than backward jumps -- in terms of
> Dijkstra's argument, they do not require an index to keep track of the
> number of iterations.

I agree. They are unnecessary though, given that one could write:

     label: do { ... break label; ... } while (false);

Cheers,

Michael

-- 
Print XML with Prince!
http://www.princexml.com


More information about the Es-discuss mailing list