|
Indeed, leading to anti-self-documenting code. I've seen the same thing inC, occasionally preceded with a comment like "this 'do' is only to allow theuse of 'break´". I've always thought that it would be better to use a gotoin such cases, since (may I not be smitten by Djikstra's ghost) a 'goto' with a well-chosen label is easier to understand than a misused iteration construct.Having said that, I do not favour adding 'goto' to Lua.
Just as a side-note, isn't the do/end construct, as encountered throughout the manual, PIL and representative LUA code for hiding local variables (i.e. used solely to limit the scope of those variables, not for looping or 'goto'-ing), also a misused iteration construct? Not that I mind terribly much, but if we're going into a discussion about principles... :P