[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua, LuaJIT2 and differences with the length operator
- From: Axel Kittenberger <axkibe@...>
- Date: Tue, 4 Jan 2011 15:07:43 +0100
> table.insert uses the same #len operator (aux_getn to be exact) and
> will gladly insert your new value into the first available hole.
a) if by the "first available" you do not mean the lowest index
(otherwise again someone following into this trap? :-), but the first
showing up on binary search, then its true.
b) it might or might not shift indexes after the hole:
See: similar holds true for insert:
http://lua-users.org/lists/lua-l/2010-12/msg00595.html
And see response:
http://lua-users.org/lists/lua-l/2010-12/msg00596.html