lua-users home
lua-l archive

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



On 1 Feb 2010, at 07:06, Martin Poelstra wrote:

Anyway, I think everyone agrees that it's possible to circumvent the use of continue by using if's. It's just that some programming constructs are more easily done using continue's, especially if one's accustomed to its existance in other languages.


The same can be said about 'goto', labeled 'break', Python's 'else' in 'for', and many others. Should they all be included in Lua? Moreover, this argument borders personal tastes.

As a side note, I'd like point out that the answer about why Lua does not have 'continue' in the unofficial FAQ [1] is wrong since the authors do not resist this feature because it breaks current 'repeat ... until' semantics [2], but because they are not sure about future implications of this apparently innocent addition nor that its the right one when compared to similar mechanisms present in other languages [3].

[1] http://batbytes.com/luafaq/#T1.26
[2] http://lua-users.org/lists/lua-l/2008-02/msg01071.html
[3] http://lua-users.org/lists/lua-l/2008-02/msg01183.html

--
Renato Maia
Computer Scientist
Tecgraf/PUC-Rio
__________________________
http://www.inf.puc-rio.br/~maia/