[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Global access control
- From: rw20@...
- Date: Sun, 28 Dec 1997 13:05:44 -0500 (EST)
Is there any news as to what (if any) strategy might be adopted
officailly by Lua to control access to globals? Having the option of
requiring global access declarations would make Lua much more robust.
I've already written something like
$noglobals
z=10
q=45
g=54
function example(x)
local w,y
global z,q
w=x*x
print(w+x+q)
print(g) -- error
end
In standard mode lua just ignores the global list, so this code works in
either mode ($globals or $noglobals).
Russ