lua-users home
lua-l archive

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


pack = table.pack or function (...) return {n=select("#", ...), ...} end

Some people feel that using an "n" field in a table is something that
has to be avoided at all costs.
With time I learned to find that fascinating. =)

  [[]],
    Eduardo Ochs

On Wed, Jun 22, 2016 at 11:58 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> The truth is that using Lua means embracing tables as your only data
>> structure. So, if you want to **manipulate** your arguments then put
>> them in a table.
>
> +1!  (a little late now, I know...)
>
> -- Roberto
>