\
Probably the "lexical scope" problem is about "repeat-until" loop in Lua:
repeat
if ... then continue end
local finished = ...
until finished
Here "continue" is impossible to implement (both as a keyword and a goto-label) as it jumps inside the scope of the local variable "finished".
The language design choice was to
- either disallow referring inner local variables in the "until" condition (you have to define "finished" variable before "repeat")
- or disallow the "continue" keyword.
IMO, the ability to use inner locals in the loop exit condition is a much more useful feature than "continue" keyword.
Of course, Lua can disallow using the "continue" keyword in some loops and allow it in other loops, but it looks too weird to be included in the language, instead another weird but versatile operator ("goto") was introduced.
Now perfectionists want to either remove "break" or introduce "continue", because both these operators are just a hidden "goto" :-)