Re: Strong tables in Lua 5.4
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Strong tables in Lua 5.4
- From: pocomane <pocomane_7a@...>
- Date: 2018年3月16日 13:25:51 +0100
On Fri, Mar 16, 2018 at 1:03 PM, pocomane <pocomane_7a@pocomane.com> wrote:
> Just a variation to address the issues that Roberto stated in the udef thread:
> - Only the empty table constructor `{}` make a "Normal" table
> - All the other table constructors, e.g. '{..}' or '{a_func()}', etc,
> generate strong tables by defaults.
Or better:
- When created with contructors like `{...}` or `{a_func()}` the table
will store nil as if it was a strong table, but then it will be
switched to the "Normal" mode.
I think that, probably, the Dirk's proposal can fully replace 'undef'.
Maybe we do not need a way to check field presence neither (aka `t.x
== undef`).