lua-users home
lua-l archive

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


On Tue, Jan 26, 2016 at 2:07 PM, Soni L. <fakedme@gmail.com> wrote:
>
>
> On 26/01/16 08:02 PM, Dirk Laurie wrote:
>>
>> 2016-01-26 17:50 GMT+02:00 Soni L. <fakedme@gmail.com>:
>>
>>> `for k, v in next, t do` is a bit less clear than `for k, v in pairs(t)
>>> do`
>>
>> On the contrary, I regard it as an idiom for bypassing __pairs
>> metamethods and have often used it.
>>
> It is not newbie-friendly and a newbie would probably be confused by it.
>

Under what circumstances is a newbie going to be dealing with __pairs
metamethods and a specific need to bypass them? That's something of a
meta-level operation that you don't generally do when writing
high-level code, and newbies are typically writing high-level code.

/s/ Adam