lua-users home
lua-l archive

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


> Given the persistent confusion about arrays vs. tables, and the scope
> for really nasty hard-to-find bugs if people get it wrong, it might be
> worth considering a 'strict mode' option (by default off, of course)
> that cause #, table.remove/insert etc to *fail* if you give them a table
> that's not an array. By fail, I mean throw an error to cause you
> application to stop.

How do you propose to do that? I mean, how can the Lua core detect that a
table is not an array without traversing it completely?