[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Documenting Lua gotchas for newbies.
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 3 Dec 2010 12:53:41 -0500
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