lua-users home
lua-l archive

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


> I seem to recall someone (lhf?) mentioning that Lua 5.1's behaviour
> might change in some way regarding the implicit creation of vararg
> tables from '...' argument lists.
> 
> Are there any more details on what direction this might take in
> the future? [...]

In 5.1 the "..." will be itself an expression that results in the
variable arguments of a vararg function. So, the equivalent of
<<unpack(arg)>> will be simply "...". If you really want a table
with all parameters, you can collect them with <<{...}>>.

To keep compatibility, a vararg function that does not use any "..."
will still build its arg parameter.

-- Roberto