[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Multiple values returned or vararg expression in numeric for loop
- From: Fidelis Assis <fidelis.assis@...>
- Date: Sun, 16 Sep 2012 14:26:54 -0300
2012/9/15 Egor Skriptunoff <egor.skriptunoff@gmail.com>:
> IMHO, "for" loop syntax should not be overburdened with error
> detection features.
I agree with you. On the other hand, instead of changing the numeric
form of for, I'd prefer an extension to the generic one to work over
tables too, besides over functions (iterators):
for v in <table> do
...
end
would then be syntactic sugar for:
for _,v in ipairs(<table>) do
...
end
I guess there's a reason for not being so, but it seems cleaner, more elegant.
--
Fidelis Assis