lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
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 <<{...}>>.

Thanks, that's very interesting!  So as I understand it, '...'
essentially becomes a way to read the contents of a slice of
the stack.

Thanks,
--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3