lua-users home
lua-l archive

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


2016-01-27 1:02 GMT+03:00 Dirk Laurie <dirk.laurie@gmail.com>:
> 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.

I have just noticed this behavior (I mainly use Lua 5.1 so this is not
too important for me) and I'm somewhat disappointed. I'm used to
having functions bypassing metatables named 'raw*',and be regarded as
'unsafe' in a way; I welcomed the change in pairs/ipairs/etc. to
respect metatables and the fact that 'next' still bypasses them is a
bit of a pity. I guess it's a bit late to change it though...

Best regards,

-- 
DoubleF