[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Changes to table length
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sat, 20 Aug 2016 17:17:08 -0700
On 16-08-20 07:04 AM, Soni L. wrote:
>> local len = 1
>> while (t[len] ~= nil) do
>> len = len + 1
>> end
>> return len
>>
> You should probably return len - 1. Otherwise {} has len 1 and {1} has
> len 2.
You're right.
> Tables shall be k/v pairs. The concept of an "array" shall be userland.
They already are.
So if I understand right you offer just drop part of existing
functionality for the sake of conceptual clearness. I think this
decision is hard to accept for many users.