[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A tricky way to determine Lua version (updated)
- From: Martin <dyngeccetor8@...>
- Date: Thu, 23 Jul 2020 19:43:39 +0200
On 2020-07-23 7:01 p.m., Philippe Verdy wrote:
As well I consider that the documented syntax of table constructors,
where explicit keys can be arbitrary expressions whose value is
unpredictable, such as a function call, is fundamentally flawed if the
behavior and notably the order of assignments, is not defined at all.
Thus syntax serves no serious purpose
I would say the same with the unary operator # which can return
anything, as well as the corel ibrary function table.maxn()....
It's off-topic but I think array-table dualism can be fixed by adding
syntax for indexing array part. Parenthesis for example. So for "t =
{false, [1] = true}", "t[1]" is true and "t(1)" is false.
-- Martin