[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newbie to lua :-) a trivial question...
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 25 Nov 2010 05:32:16 +0200
On Thu, Nov 25, 2010 at 3:14 AM, starwing <weasley.wx@gmail.com> wrote:
> why not do this in semantics? e.g. for multi return value function f()
> return 4,5,6 end:
> {f(), 1,2,3} == {4,5,6,1,2,3} --> different
> {(f()), 1,2,3} == {4,1,2,3} --> as the same
The trouble is that a lot of Lua code would mysteriously break, since
we have internalized the 'only expand at end' rule.
So there was a proposal to make ... mean expand:
{f()...,1,2,3}
which would also apply to function arguments.
steve d