lua-users home
lua-l archive

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


On Tue, Apr 17, 2012 at 3:12 PM, joao lobato <btnfdp.lobato@gmail.com> wrote:
> On 4/17/12, Coda Highland <chighland@gmail.com> wrote:
>> Okay, yeah, then the only way to verify issequence is to either (1)
>> get the real size of the array part (which isn't exposed AFAIK) or (2)
>> iterate over pairs(t).
>>
>> /s/ Adam
>>
>>
>
> A sequence can have all the key-value pairs in the array-part, all in
> the hash-part or every case in between.
>
> Those two concepts are orthogonal.
>

I meant to imply that (1) would be something implemented inside the
interpreter because that behavior isn't defined in the spec. (Indeed,
the spec doesn't require that anything is implemented array-like as
long as Lua scripts can treat it as a sequence.) I realized a while
after I sent the message that I didn't make this clear.

/s/ Adam