In my experience with with Lua, one thing particularly bugs me and requires me to expend a lot of effort trying to work my way around a simple bug. Here’s what I’ll do, for example
local tab = {]
tab.a = "Value"
local temp = tab
print(tab.a)
temp.a = nil
print(tab.a)
Would print:
“Value”
“nil”
Somehow, when you copy a table into a temporary one and then change the values from the temporary table, the changes get rerouted back to the original table. This brings me to the thread title, which is can you make static variables in Lua?