Unpopularity of global variables - why?

dunbarx at aol.com dunbarx at aol.com
Fri Oct 12 17:16:14 CDT 2012


So you see there is nothing wrong with them, just be careful. They are both powerful and dangerous, like a firearm, but similarly, very useful in the appropriate situation.


I have an ancient personal distaste that derives from the fact that in HC, they persist in the variable watcher and cause clutter. But in LC, this can be addressed.


Craig Newman



-----Original Message-----
From: Guglielmo Braguglia <guglielmo at braguglia.ch>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Fri, Oct 12, 2012 5:56 pm
Subject: Re: Unpopularity of global variables - why?


*Holy words Bob !!!*

This would be the most sensible thing ...
... the "global" declared for one MainStack should be valid only in his 
context and not for any mainStack opened !

But unfortunately is not like that so ... use with caution ! ;-)

Guglielmo

On 12.10.2012 23:25, Bob Sneidar wrote:
> I don't think that globals are a bad thing, but I do think they should 
> only apply to the stack they are defined in, or else have another 
> class of globals called stack or application globals (or how about 
> both!). That would solve the vast majority of cross globalization. 
> (Hey I think I coined a new term!

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 


More information about the use-livecode mailing list