Destructuring can also show up in places where an assignment implicitly takes place. An example of this is a for loop:
tuples = {
{"hello", "world"}
{"egg", "head"}
}
for {left, right} in *tuples
print left, right
We know each element in the array table is a two item tuple, so we can unpack it directly in the names clause of the for statement using a destructure.
Our main concern with "continue" is that there are several other control structures that (in our view) are more or less as important as "continue" and may even replace it. (E.g., break with labels [as in Java] or even a more generic goto.) "continue" does not seem more special than other control-structure mechanisms, except that it is present in more languages. (Perl actually has two "continue"statements, "next" and "redo". Both are useful.
不过确实可以用麻烦一点的方法变相实现这个功能:
for k, v in pairs data
while true do
if conditions
break