lua-users home
lua-l archive

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


> On Jun 30, 2016, at 4:40 PM, Soni L. <fakedme@gmail.com> wrote:
> 
> 
> 
> On 30/06/16 08:36 PM, Tim Hill wrote:
>>> On Jun 30, 2016, at 6:23 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>>> 
>>>> — How should constructors set length? What are the lengths of {}, {1, 2} and {1, 2, [3]=3} ?
>>> 0, 2, and 2.
>>> 
>>> -- Roberto
>>> 
>> Agreed.
>> 
>> —Tim
>> 
>> 
> What about {1, [3]=3, 2} ? {1, [2]=2, 2} ? etc
> 

2 and 2. The largest implicit key. As I said, this is the *least* surprising, not that it has no surprises at all.

—Tim