[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table.maxn...
- From: Andrew Starks <andrew.starks@...>
- Date: Mon, 1 Jun 2015 20:14:39 -0500
On Monday, June 1, 2015, Brigham Toskin <brighamtoskin@gmail.com> wrote:
This is not true. I do not want # to count string keys; only integers from 1..n where the values are not nil. So, the current behavior is all that I want. I'm not against anything here, but I've never needed to know that total number of non-nils.
I have wanted to loop through a table and have the numeric keys in order and the string keys in any order they choose.
I care about ordinality and not always sequences. There are many times that I wish that ipairs would go through all integer keys, in order. I've never needed all numbers (float too) to behave that way, but if it did, it would be fine. One could argue for that world and then checking for sequences would be uber trivial. But that would make writing numeric keys somewhat special and would break code.
As is, I do tricks like table of tables with [1] containing the index and it's fine.
- References:
- Re: table.maxn..., Tim Hill
- Re: table.maxn..., Coda Highland
- Re: table.maxn..., Coda Highland
- Re: table.maxn..., Roberto Ierusalimschy
- Re: table.maxn..., Dirk Laurie
- Re: table.maxn..., Roberto Ierusalimschy
- Re: table.maxn..., Andrew Starks
- Re: table.maxn..., Dirk Laurie
- Re: table.maxn..., Brigham Toskin
- Re: table.maxn..., Roberto Ierusalimschy
- Re: table.maxn..., Brigham Toskin
- Re: table.maxn..., Coda Highland
- Re: table.maxn..., Brigham Toskin