|
On Thu, 25 Apr 2013 07:30:48 +0200I would too. If I really want something to be global, I'll
Thomas Jericke <tjericke@indel.ch> wrote:
> On 04/24/2013 11:09 PM, William Ahern wrote:
> > The most sensible and simplest rule is what Lua uses, IMO.
>
> I would prefer nothing by default.
global myvar = 0
It's not like I'm going to have 40 globals anyway, so this won't be
much writing.
And of course, I'm a fast enough typist to do this for non-globals:
local myvar_local
I understand why defaulting to local would mess up a lot of good things
in Lua, but unless one is the type who seldom makes silly mistakes,
defaulting to global would result in lots of hard to troubleshoot
problems.
Thanks,
SteveT
Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance