lua-users home
lua-l archive

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




On Thu, Jul 23, 2009 at 12:31 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> I mean how would tbl[nil] throwing an error affect print(xxx)? Does
> print(xxx) access the nil key of any table?

You're right. My bad.

Interesting, I had no idea that reading of tables with keys nil and nan were allowed.
Kahlua throws an error when a table key is nil or nan, both for get and set, and I don't think anyone has even noticed that different behaviour yet.

Are there any use cases where allowing reading t[nil] or t[nan] is useful?
I still haven't decided if I should update Kahlua to reflect this behaviour or not.