lua-users home
lua-l archive

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


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.