[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [Proposal] rawpairs()
- From: Sergey Zakharchenko <doublef.mobile@...>
- Date: Wed, 27 Jan 2016 10:45:23 +0300
2016-01-27 1:02 GMT+03:00 Dirk Laurie <firstname.lastname@example.org>:
> 2016-01-26 17:50 GMT+02:00 Soni L. <email@example.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...