lua-users home
lua-l archive

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


On Fri, Dec 3, 2010 at 12:39 PM, Hisham <hisham.hm@gmail.com> wrote:
> >From those uses, I see two sensible deterministic definitions for #,
> which would be either:
>
> * the number of elements in the table

besides the "if #t == 0" (note we already have "if next(t)==nil"), i
don't see where this can be useful.  IOW: deterministic but useless

> * "array length": the number of continuous integer keys starting from 1

this suffers from the same O(n) problem as the "number of the highest
numeric key".


-- 
Javier