[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: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 15 Sep 2012 09:32:48 +0300
On 9/14/12, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> My point was exactly that, if the code has some small error (an 'l'
> instead of an 'I'), the proposed change would result in a weird behavior
> without error messages.
Thank you for revealing true reason of current "for" loop syntax.
"For" loop is as vulnerable to this type of errors as any other part
of Lua code.
Misspelled variable names are easily detectable by something like "strict.lua".
IMHO, "for" loop syntax should not be overburdened with error
detection features.