lua-users home
lua-l archive

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


On Mon, Apr 8, 2013 at 3:29 PM, Daniel Silverstone <dsilvers@digital-scurf.org> wrote:
Expected.

Of course, in 5.2 you can redefine # on a table by giving it a metatable with the metamethod __len.  Then you can make it mean anything you like.  I think people are confused because ipairs(t) does iterate until the first 'hole', but # is meant to be fast and not do O(N) lookups