lua-users home
lua-l archive

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


> 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