lua-users home
lua-l archive

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

On Sat, Feb 29, 2020 at 12:59 AM Anton Jordaan wrote:
If I want to access the value of t[a][b][c][d][e]

I suggest that it would be more useful -- and more consistent -- if the
"Attempt to index a nil value" error is deprecated and, instead, the
indexing of undefined variables does the following:

When reading: simply return nil.
See solution #3

When writing: automatically assign a single-entry table to each
undefined variable, with the given index the sole entry.

Creating a table would better be explicit.