lua-users home
lua-l archive

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


> Am 12.04.2016 um 14:05 schrieb Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
> 
>> Oh, I see. So there is __ipairs, too. Maybe that could be noted in the doc as well, http://www.lua.org/manual/5.3/manual.html#pdf-ipairs does not mention it, while http://www.lua.org/manual/5.3/manual.html#pdf-pairs does.
> 
> In Lua 5.3, there is no __ipairs, though it is present for compatibility.
> 
> http://www.lua.org/manual/5.3/readme.html#changes says:
> 
> 	Libraries
> 	- ipairs and the table library respect metamethods
> 


I see.  Will the __ipairs metamethod eventually be removed?  Should it be avoided in new code?  Is the way to go to implement __pairs, __index, and, __newindex?