lua-users home
lua-l archive

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


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