lua-users home
lua-l archive

Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table

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


Ah, the thread has been broken a couple times. Apologies. I would have replied to it instead. Is this the message you mean?

   http://lua-users.org/lists/lua-l/2020-03/msg00017.html

Anyway, the point of my message was not simply the idea of using [a,b,c] for multi-indices. Rather it was a proposal that keeps backward compatibility. In particular the problem of multiple function returns, the weird order of arguments in __newindex, and the fact that __index and __newindex are only called when the key is not present in the table. Those were not discussed before, and there is no chance a proposal like that would be accepted without the compatibility. It would break everything.

The question is: is there any existing code that would break under this proposal?


AltStyle によって変換されたページ (->オリジナル) /