lua-users home
lua-l archive

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


2010/5/22 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> Take the behavior of ipairs(..) in Lua 5.1 and make it a special case
>> of pairs() in Lua 5.2. What is needed is simply that the language
>> guarantees that the iterator returned by pairs() will return the
>> values corresponding to the keys 1 and upwards in order. The order
>> before that, or the order of any keys after the first nil-valued
>> integer keys is arbitrary.
>
> This is messy to implement.
>

Ok, then my suggestion doesn't make sense. It was based on the
assumption that this was how the current Lua behaved. It turns out the
current Lua behaves *almost* like this, and I understand that's not
nearly good enough.