lua-users home
lua-l archive

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


> Yes, since it only worked on raw tables in Lua 5.1, I can follow you
> here. I wonder why __ipairs was introduced in Lua 5.2 in the first
> place then?

Mainly to allow proxies and to ensure that tables with metamethods
cannot be "raw"-accessed unless through explicit raw functions.

(Unfortunately, this last goal is broken: "pairs" over a table with
no metatable returns a raw 'next' function that can be used over
any table.)

-- Roberto