[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Thoughts on new syntax for <const>
- From: Sean Conner <sean@...>
- Date: Tue, 21 May 2019 23:17:30 -0400
It appears that <const> just marks a local variable as non-assignable:
> local <const> x = 5 x = 6
stdin:1: assignment to const variable 'x'
>
But the target isn't constant:
> local <const> x = {} x.foo = 1
>
To get a constant table, you would still have to use a proxy table and
intercept __index and __newindex.
-spc