lua-users home
lua-l archive

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


On Tue, Mar 1, 2011 at 1:27 PM, Eduardo Ochs <eduardoochs@gmail.com> wrote:
>  mytableinsert = function (T, ...)
>      local objects = table.pack(...)
>      for i=1,n do
>        T.n = T.n + 1
>        T[n] = objects[i]
>      end
>      return T
>    end

I really hope programs like this do not become common. Making a new
garbage table on every insert?! This is why I advocated having
table.pack accept a table argument...

-- 
- Patrick Donnelly