I know this question is seven years old, but Lua 5.4
finally brings const
to the developers!
local a <const> = 42
a = 100500
Will produce an error:
lua: tmp.lua:2: attempt to assign to const variable 'a'
I know this question is seven years old, but Lua 5.4
finally brings const
to the developers!
local a <const> = 42
a = 100500
Will produce an error:
lua: tmp.lua:2: attempt to assign to const variable 'a'