lua-users home
lua-l archive

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


On 10/2/13, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
>> 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.
>

Unfortunately, Lua itself encourages such a separation and provides both
pairs and ipairs to reinforce the distinction.

--Leo--