lua-users home
lua-l archive

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


I have a hard time understanding all these proposals.

If you want to use 0 based arrays, just use 0 based arrays.
If you want to use a different #, just use a different #.

If you don't like your ipairs, just change YOUR copy of ipairs (rather
than trying to change Roberto's and Luiz's).

On 12/14/10, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
>> I am interested to see an application/algorithm where an array with
>> "nil" values is required, and it is inconvenient/impossible to solve
>> it using sentinel values (like NoValue = {}) or more advanced data
>> types built on top of table semantics.
>
> Or plainly just keeping your own notion of length of the array, e.g.
> in a field named "n". It's just that # does not apply to those arrays.
>
>