[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pairs(t, skey) and ipairs(t, skey)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 2 Oct 2013 18:27:46 -0300
> Another habit we should not be practicing is thinking of Lua tables as having
> array and hash parts.
Exactly. This is an implementation detail for getting performance and reduced
memory usage but Lua tables remain what they are: associative arrays.
You don't even need to use #t if you keep track of how many items t has
in some other way.