lua-users home
lua-l archive

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


  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