lua-users home
lua-l archive

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


> Is it still the case in Lua 5.4 that the array part of a table is
> never shrunk except possibly when you assign a value to a positive
> integer index outside it?

That was not the case in previous versions and it is not the case in 5.4.

  t = {nil, nil, nil, nil}
  -- array part has size 4, hash part has size 0
  t.a = true       -- force a rehash
  -- now, array part has size 0, hash part has size 1

-- Roberto