[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: new "empty" value/type in Lua?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 3 Jul 2013 08:33:04 -0300
> 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.