[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Redefining locals
- From: "Bilyk, Alex" <ABilyk@...>
- Date: Thu, 11 Nov 2004 13:28:12 -0800
While eveyone is debating Scheme vs. Lua, the original message questioned the usefulness of being able to say
local a=1
local a=1
My thinking is that its no more useful (or problematic for that matter) than using globals
a=1
a=1
If one makes mistakes to the tune of
local f = 1
<N lines of code>
local function f() end -- Being unintended!
Than the same would apply to globals as well.
f = 1
<N lines of code>
function f() end -- Shell we debate whether this should be allowed or why is it useful?
I doesn't seem to me like it would be Lua's responsibility to address this particular coding practice. Pointing a loaded gun and one's feet and pulling the trigger may be painful but it is not the gun's falt even when done by accident.
Just my .02
Alex