[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table.maxn...
- From: Coda Highland <chighland@...>
- Date: Mon, 1 Jun 2015 15:31:44 -0700
On Mon, Jun 1, 2015 at 3:27 PM, Brigham Toskin <brighamtoskin@gmail.com> wrote:
> On Mon, Jun 1, 2015 at 3:07 PM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
>> Another reason not to do so is that it makes '#' mostly useless for
>> sequences (which are the only reason for its existence).
>
>
> Oh, I don't know that's necessarily true. In the case where t is a sequence
> (with no non-numeric keys), then #t == numentries(t), sure. But they are
> answering fundamentally different questions. It's kinda like saying that
> pairs() is a bad idea because it makes ipairs() redundant for sequences.
Historical note: ipairs() nearly got removed (in favor of "for k in 1,
#t") so this might not be the most useful argument. ;)
/s/ Adam
- 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