为什么Lua不支持大多数编程语言都有的continue,却非得支持一般情况下用得很少的 repeat until ?

关于没有 continue,Roberto 在邮件列表里解释过[1]:
[...] Our main concern with "continue" is that thereare several other control structures that (in our view) are more orless as important as "continue" and may even replace it. (E.g., breakwith labels [as in Java] or even a more generic goto.) "continue" doesnot 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.)
Continue 出现的场合均可以用 if then 替代,或者在 for 循环中套一个 repeat until 循环[2],虽然丑是比较丑。Lua 5.2.0 beta 中出现的 goto 也可以用来替代 continue。更多讨论详见[3]。

至于 repeat until 其实不算“非得支持”,算是顺手支持的吧,实现起来很简单[4]。

[1] lua-users.org/lists/lua
[2] lua-users.org/lists/lua
[3] lua-users.org/wiki/Cont
[4] lua.org/source/5.1/lpar,"repeatstat" 与 “whilestat”。
原发布于 https://www.zhihu.com/question/19954162/answer/13465654