[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pairs(t, skey) and ipairs(t, skey)
- From: Sean Conner <sean@...>
- Date: Wed, 2 Oct 2013 21:45:38 -0400
It was thus said that the Great Tim Hill once stated:
>
> First, it's a bit odd to have to work-around the # operator like this
> (witness the number of times this comes up in this forum). Second, I'm not
> sure why you take such issue with my suggested language change .. what is
> actually wrong with it?
>
> Present behavior:
> With a sequence: # returns valid length
> Without a sequence: # returns arbitrary integer value that is easy to mistake for a length
>
> Suggested behavior:
> With a sequence: # returns valid length
> Without a sequence: # returns nil
>
> Why is the suggested behavior bad?
I misunderstood the suggestion to also include support for nils in a
sequence. I apologize for any confusion on my part.
-spc
- References:
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- Re: pairs(t, skey) and ipairs(t, skey), Luiz Henrique de Figueiredo
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- pairs(t, skey) and ipairs(t, skey), Andrew Starks
- Re: pairs(t, skey) and ipairs(t, skey), Luiz Henrique de Figueiredo
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- Re: pairs(t, skey) and ipairs(t, skey), Sean Conner
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- Re: pairs(t, skey) and ipairs(t, skey), Sean Conner
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill