[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Performance problem with table.move
- From: Viacheslav Usov <via.usov@...>
- Date: Mon, 7 Dec 2020 19:26:13 +0100
On Sat, Dec 5, 2020 at 2:31 PM Egor Skriptunoff
> We need something like table.rebuild()/table.new() in Lua to avoid inserting fake values.
Would you have reached the same conclusion if the problem had been
formulated in terms of true and false rather than 'Lua' and nil?
The nil value is a special case in Lua's tables. Whether it is good
that nil is a special case is very much debatable, but this cannot be
changed without hefty consequences for compatibility. As long as nil
stays a special case, any contrived example that exposes that nil is a
special case is redundant, and any conclusions derived from such
examples are not well founded and probably futile.