[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua next version
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 24 Jun 2009 08:36:12 -0300
> 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?