[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua, LuaJIT2 and differences with the length operator
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 5 Jan 2011 10:16:38 -0200
> I know that, but I never said it did. My point was, if you're worried
> about using #t because you expect hole-containing input, then don't
> use #t. Using table.maxn() instead of #t is no more expensive than
> looking for holes in the first place. (That's was what I meant by
> "call table.maxn() instead".)
It is important to keep in mind that, once you allow nils in a list,
these nils may appear as the last elements in the list. So, maxn
does not solve the problem of lists with nils. (That is why we
removed it.)
-- Roberto
- References:
- Re: Lua, LuaJIT2 and differences with the length operator, Leo Razoumov
- Re: Lua, LuaJIT2 and differences with the length operator, Dirk Laurie
- Re: Lua, LuaJIT2 and differences with the length operator, Leo Razoumov
- Re: Lua, LuaJIT2 and differences with the length operator, Tony Finch
- Re: Lua, LuaJIT2 and differences with the length operator, Leo Razoumov
- Re: Lua, LuaJIT2 and differences with the length operator, Greg Falcon
- Re: Lua, LuaJIT2 and differences with the length operator, Norbert Kiesel
- Re: Lua, LuaJIT2 and differences with the length operator, Greg Falcon