[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table library changes (was Re: table.new in 5.3?)
- From: steve donovan <steve.j.donovan@...>
- Date: Sun, 24 Nov 2013 11:17:23 +0200
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.