Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ufo
· 1y ago · 0 comments
Naturally, the main catch is that this only detects the violation at run-time. It also won't stop you from accidentally overwriting a global variable that already exists.
Comments
[–]
nmz
1y ago
> It also won't stop you from accidentally overwriting a global variable that already exists.
That's also solvable using metatables.
[–]
Dylan16807
1y ago
Do the declarations in 5.5 prevent overwriting? That sounds tricky to define and implement.