Unpopularity of global variables - why?

Bob Sneidar bobs at twft.com
Fri Oct 12 17:29:04 EDT 2012

On Oct 12, 2012, at 2:01 PM, Mark Wieder wrote:

> Graham-
> Friday, October 12, 2012, 1:50:30 PM, you wrote:
>> Obviously I'm missing the point - I know I am. It's probably my
>> age.
> :-P
>> But I'd like to see a more reasoned attack on globals before I
>> give them up.
> Generally speaking (there are exceptions) the main reason global
> variables are a bad idea is that they have no protection. Any script
> in any stack can change the value of a global variable behind your
> back, and then it's a real pain trying to figure out what's going on.

And may I add, if RunRev would get off their butts about the variable breakpoint CTD bug, it would be really simple to find out where a thing is going wrong! Set a breakpoint on a global, and when it changes unexpectedly, there you go! Honestly, for a feature that would prove so incredibly helpful, shouldn't they fix this first before releasing any more features?? (Or did they already? Am I like that old lady in SNL? "Oh, well then... NEVER MIND!")


More information about the Use-livecode mailing list