[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: Fri, 14 Sep 2012 10:59:05 +0300
On 9/14/12, Coda Highland <chighland@gmail.com> wrote:
> If Lua patterns were to hold, the syntax would be
> "for <variable> = <exprlist> do"
> rather than
> "for <variable> = <expr>, <expr>[, <expr>] do".
> /s/ Adam
Why Lua uses the latter syntax, but not the former?
In fact, numeric "for" loop just accepts a usual list of values.
What is the reason for this syntax to be unlike it expected to be?