[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: An alternative to the "continue" statement
- From: "Javier Guerra" <javier@...>
- Date: Tue, 26 Feb 2008 09:12:28 -0500
On 2/26/08, Fabien <email@example.com> wrote:
> Basically, it lets qualify a loop header with additional properties like
> "if", "while", "until", "for". Many "break"s in for loops can be replaced
i like this. of course, 'deep' breaks are usually convenient. 'deep'
continues not so much, IMO.
taking it to an extreme, i think 'if', 'while', 'until' and 'for'
(both variants) could be chainable blocks, terminated by a 'do' or
'then' ('else' too?), so you could write:
for k,v in pairs(t) while itsok(k) do
if whatever(x) until finish(y) then
while going(a) if keeps(b) for c=ever(d) until tired(e) do
does that make any sense??
i kind of like it... but not sure... it's weird