[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: new "empty" value/type in Lua?
- From: Luis Carvalho <lexcarvalho@...>
- Date: Tue, 2 Jul 2013 21:20:09 -0400
> Come to think of it, if it did get into standard Lua, I'd even throw
> around the idea of merging array.new() 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 array.new().
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
Computers are useless. They can only give you answers.
-- Pablo Picasso
Luis Carvalho (Kozure)
lua -e 'print((("lexcarvalho@NO.gmail.SPAM.com"):gsub("(%u+%.)","")))'