lua-users home
lua-l archive

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


On Tue, Nov 24, 2020 at 10:30 PM Petri Häkkinen wrote:
Perhaps it’s again time to consider adding table.new?

It would be nice to have a function like
table.rebuild( [ t, ] min_array_size, min_hash_size)
which sets size constraints and shrinks the table.
The size constraints are active until next invocation of table.rebuild.
if the first parameter (t) is omitted then new table is created.
If 2nd or 3rd parameter is nil, it defaults to zero.