lua-users home
lua-l archive

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

Duck <> writes:
> So, code which might gracefully and efficiently use {...} must fall back
> ungracefully and less inefficiently (say the detractors) on select(), or
> table.maxn(), to deal correctly with varargs.

Can you given an example where the "fall backs" are less graceful or
less efficient?  I'd think using "select()" would be _more_ efficient
(since it can avoid creating the table).

Anyway, code like:

   local t = {...}
   for k = 1, #t do
      local v = t[k]
      do_something (k, v)

seems clear enough...



Somebody has to do something, and it's just incredibly pathetic that it
has to be us.  -- Jerry Garcia