lua-users home
lua-l archive

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




2010/11/25 steve donovan <steve.j.donovan@gmail.com>
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


this seems feasible... is this rule acceptable for the mainline of lua language?

maybe we can accept a convert script to convert old code to new rule. IMHO the history should not become the stumbling block.