Unpopularity of global variables - why?

Monte Goulding monte at sweattechnologies.com
Fri Oct 12 18:23:32 EDT 2012


Hmm... It's much better practice to use script locals and getters and setters. Or custom properties. I can't remember the last time I used a global.

--
M E R Goulding
Software development services

mergExt - There's an external for that!

On 13/10/2012, at 8:50 AM, Guglielmo Braguglia <guglielmo at braguglia.ch> wrote:

> *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