lua-users home
lua-l archive

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

2018-06-05 23:31 GMT+02:00 Russell Haley <>:
> On Tue, Jun 5, 2018 at 3:24 AM, Dirk Laurie <> wrote:

> Hi Dirk, your Lua history lesson was excellent but I'm struggling to
> understand the preceding comment. Could you clarify what was "noticed" (are
> you referring to undef?) and who "they" were?

If you grep around in the Lua 5.4-work1 source code starting with
LUA_NILINTABLE, and just following strange words,
you eventually discover

(a) a new `lua_type LUA_TEMPTY`
(b) a predefined value `luaH_emptyobject of that type`

which is stored in tables instead of `nil` when you compile with
LUA_NILINTABLE defined. `undef` is therefore needed for when you want
to store a real nil wiith its normal behaviour.

I apologize for the grammatical solecism "they". Although I consider
my command of English to be near-native, it has never been my home
language, and traces of Afrikaans occasionally shine through. ("shine
through" is another such.) Afrikaans does not have an impersonal
pronoun and the same word that also means "they, them, their" is used
for the purpose.

>> But the notion had other drawbacks, so nils-in-tables has been
>> scrapped. For now.

> I wasn't really clear about why the NIL_IN_TABLE option was retracted.  I
> thought it was because there was more work remaining than could be
> reasonably completed before the unannounced 5.4 release date?

I don't there are planned release dates. Lua has always gone through
as many work, alpha and beta versions as it takes for a reasonably
well-tested product to emerge.

There was a long thread with plenty of discussion, including delight,
dissent and counter-proposals. A highly respected active member of
this list made several long posts, signing off with the conclusion "
In thinking things over, I don't like the undef idea.  I think it
introduces too many issues."

Between the lines, I read that the Lua team itself is not unanimous on
this one, and the implementation issue was just the last straw.