lua-users home
lua-l archive

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


> That's a good solution, and we could even avoid the metatable by making '#'
> and ipairs check table.n by default, similarly to Lua 5.0 (but without
> setlength.) In this sense a table is automatically a "simple" array just by
> setting 'n'.

There were good reasons we removed that from 5.0, let us not go back
again.  The originally proposed solution is simply a library stuff, with
mostly optional use. Making # look t.n by default is a change in the
guts of Lua.

-- Roberto