[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Predefined labels (Inspired by discussion on: Why do we have ipairs?)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 2 Jul 2014 15:56:12 +0200
2014-07-02 13:51 GMT+02:00 David Demelier <demelier.david@gmail.com>:
> I don't know any other language that use goto continue or goto break to
> control the loop, it's just a bloody idea.
Lua 5.2 uses "goto continue" if you want to, and implicitly translates
"break" to "goto break" whether you want to or not. The opportunity
to provide a "continue" keyword in Lua 5.3 seems not to have been
taken.
So basically my post says: if you can't beat them, join them.
If you are forced to type "goto continue", at least be spared
the trouble of inserting ::continue::. It *is* just an idea.
But the fact that no other language uses it, if true, makes me like
it better, not less.