Why continue is not allowed outside iteration statements
david.hopwood at industrial-designers.co.uk
Tue Nov 25 21:00:46 PST 2008
Michael Day wrote:
> Why is break allowed outside of iteration statements, but not continue?
Perhaps because 'continue' would implicitly create an iteration, when no
iteration construct is apparent in the source code.
That would violate the principle advocated by Dijkstra in
'A Case Against the GO TO Statement'
the start of every block (not even just every labelled block) would be a
possible jump target, with no explicit indication that you need to keep
track of the number of iterations of the block in order to describe the
progress of that function execution.
More information about the Es-discuss