lua-users home
lua-l archive

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


> pairs/ipairs has *nothing* to do with the fact that tables has two parts.

It's not well known that the array part is just an optimization: even
if the table only has integer keys from 1 to N, part or all of that
data may be stored in the hash part. See for instance
	http://www.lua.org/source/5.1/ltable.c.html#luaH_getnum