[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Undefined variables returning nil
- From: Kevin Martin <kev82@...>
- Date: Tue, 19 Mar 2013 22:40:24 +0000
On 19 Mar 2013, at 22:32, William Sumner wrote:
> I know Lua only has tables. Because they're used for arrays, classes, and more, catching only undefined globals is insufficient. I'm suggesting that, unless there's a good reason for the current behavior that I'm unaware of, relying on user-implemented solutions is undesirable and that the language should raise an error because the current default behavior is unsafe.
By raising an error , you are removing the language's method of determining if a table contains a key (if table[key] == nil then … end). Surely you agree this is a fairly critical operation? How do suggest this is done instead?
Kev