News for hackers. Stuff that matters.
Re:Loop Exits and Structured Programming: Reopening the Deba... by dbaupp on Tuesday June 13, 2017 @12:11AM (#14542813)
Of course it is strictly less powerful than gotos. That's actually the point of the more structured constructs: they are more restrictive and so can be reasoned about more easily. Note that I'm specifically piking up on labelled break/continue as a substitute for nested loops like the following

  while ... {
    bool shouldBreakOuter = false;
    while ... { ... shouldBreakOuter = true; break; }
    if (shouldBreakOuter) break;
  }
since that what the original comments description sounded like. Being a rather general control flow mechanism, there are of course other uses of goto which this doesn't cover.

That said, I'm not sure I understand the comparison: the lexical scoping doesn't seem to be ambiguous in Java. Could you expand on what you mean?

Re:Loop Exits and Structured Programming: Reopening the Deba... by sedachv on Tuesday June 13, 2017 @01:34AM (#14543025)
If you visualize nested scopes as indent levels, the labelXYZ: sits in an indent level above where it is visible. Not only that, but labelXYZ: does not come before the statement that it transfers control to, but two statements before. If all that was not bad enough, most people format the labeled statement to sit at the same indentation level. The combination of these three things is pretty much the worst possible when it comes to reading code. Compare this to block/tagbody/prog and their indentation conventions in Common Lisp.