lua-users home
lua-l archive

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


On Sun, Nov 24, 2013 at 2:38 AM, Tom N Harris <telliamed@whoopdedo.org> wrote:
>     table.insert(list, pos, value, ...)

I'd support this if it could be done significantly faster than than a
chain of inserts. Time for us to start playing with C, perhaps?

But ...  an existing function that acquires extra arguments leads to
surprising new behaviour, e.g. table.insert(t,1,str:gsub('%W','_'))
will insert _two_ values in the table.

So I'd vote for table.insertvalues....

>     table.remove(list, "*all")
> It's probably more clear to have a distinct table.clear function.

Yes, table.insert is already overloaded in an initially confusing way.

steve d.