lua-users home
lua-l archive

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


I have an application in which new tables tend to get created
unnecessarily.

E.g.

    myfunc(x)

returns a table with the same keys as x. When called with
an anonymous table, e.g.

   myfunc{1,2,3,4,5}

it is OK to modify the table and return it, but when called with
a table that already has a name, one must make a new copy
in case that name is referenced later.

Is there a way of diagnosing this difference?