lua-users home
lua-l archive

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


On Thu, Jun 23, 2016 at 1:31 PM, Viacheslav Usov <via.usov@gmail.com> wrote:

> I'd interpret your results a little differently: select is clearly preferential perf-wise for one or two arguments, then just use {...}.

Which suggests two further points.

1. (More important) The reference manual should point out that {...} is the best way, overall, to deal with variadic arguments, and select is deprecated. This brings us back to the original topic.

2. (Less important) It would be nice to have a way to determine the number of variadic arguments without calling any function, something like #... as already suggested. Then a variadic function could, in principle, choose an optimal way to handle any number of arguments.

Cheers,
V.