lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


on 10/4/06 10:48 AM, Aaron Brown at arundelo@hotmail.com wrote:

> Mark Hamburg wrote:
> 
>> Global-by-default has two problems.
>> 
>> One is that it generates less efficient code. If you could
>> have gotten by with a local declaration, your code might
>> be more efficient.
> 
> That problem doesn't really lie with global-by-default, it
> lies with the programmer who doesn't know when to use (or
> forgets to use) use local variables.

True, but a warning about using an undeclared global might spark programmers
to recognize that they could have just as well declared the variable as
local.

Mark