[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Proposal: Make creating large arrays faster and "allow" nils in arrays
- From: Robert Burke <sharpobject@...>
- Date: Sun, 6 Sep 2020 18:50:35 +0900
On Sun, Sep 6, 2020 at 4:21 PM Egor Skriptunoff
<egor.skriptunoff@gmail.com> wrote:
> We already have a syntax for optional attributes, so why invent a new one?
> Just allow a table constructor to have optional attribute:
>
> {...} <size 1000,2000>
> {...} <size 0,2000>
> {...} <size 0,2000 noshrink>
> {...} <const>
> {...} <weak>
> {...} <ephemeron>
>
x = {} <weak>
hello()
is a single statement in Lua, so you may not have a great time with that one.