[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strong tables in Lua 5.4
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 19 Mar 2018 21:28:44 +0200
2018-03-19 21:08 GMT+02:00 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
> More concretely, I propose a little experiment: suppose that Lua raises
> a run-time error for every assignment of nils to tables except in
> explicit assignments with a constant nil (t[k]=nil). How frequently this
> error will occurr without hinting a hidden bug in the code?
Including, of course, var=uninit where "var" is global and "uninit" is
an uninitialized global?
My first reaction was that it occurs often, but then I realized that
the cases where I would do that, the target would be an upvalue or a
local — if it is a global, it is likely to be a typo.
Yes! Give us that error!