lua-users home
lua-l archive

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


> I'm also confused about the need for pairs/ipairs metamethods.

There is no *need* for pairs/ipairs metamethods just as there is no need
for pairs/ipairs functions. (But there is a need for next and # so that
pairs/ipairs can be implemented.)

> (1) acknowledge that pairs/ipairs pertain only to tables (several
> people have done this already); and

But tables are used to implement objects and those may want different behaviors.