lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


If one must have continue, and I will admit to missing it fairly routinely in some code, then there are a couple of simple options with respect to the scope rule:

1. Disallow continue when the innermost loop is a repeat/until loop.
2. Disallow access to variables defined inside the loop in the condition portion of a repeat/until that also includes a continue statement.

Either of these could be expanded in the future to allow more complicated solutions like only disallowing variables that might not be defined or using the proposed assumed nil initialization proposed at the beginning of the thread.

Personally, if doing anything about this, I would start with the first option and see how many concerns that allays.

Mark