lua-users home
lua-l archive

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


On Mon, Mar 19, 2018 at 11:08 AM, pocomane wrote:
> All we need is USER-DEFINABLE TABLE LENGTH

Pratically, are you proposing a new {...#} contructor that is just
syntactic sugar for:


It seems that you are focused on red herring (new constructor syntax) and overlooked main idea:
I suggest #t to become LHS-_expression_.
Actually, that's all.

And as optional addition, a convenient syntactic sugar
   t = { ... #}
may be introduced for
   t = { ... }
   #t = select( '#', ... )

But even without this new constructor syntax my suggestion would be helpful.
 

  The [...] constructor can be used instead


Yes, it's a good choice.
And there are several more possible variants exist.
But I'm not sure which syntax would be the best.
My proposed syntax {...#} is not nice indeed.