lua-users home
lua-l archive

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

Hisham wrote:
> Come to think of it, if it did get into standard Lua, I'd even throw
> around the idea of merging and table.pack(). If we had the
> notion of sequence tables with n and a metatable "in the language", it
> would make sense if table.pack() returned one, and then it's the same
> as

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'.


Computers are useless. They can only give you answers.
                -- Pablo Picasso

Luis Carvalho (Kozure)
lua -e 'print(((""):gsub("(%u+%.)","")))'