What's wrong with Globals?

Mark Wieder mwieder at ahsoftware.net
Sat Mar 31 14:30:04 EDT 2007


Richard-

Friday, March 30, 2007, 9:50:36 PM, you wrote:

>    If using globals are to be seen as a Very Bad Thing,
>    why is it that some of the world's most experienced programmers
>    keep designing languages that support them?

Because, as Joe pointed out, they "really get something done that
worked and solved problems". Global variables are one of the
out-of-the-box enablers that help people find their way in a new
environment (and face it - xtalk is a new environment to anyone used
to anything else).

I put globals in the same category as unquoted literal strings for
getting the instant gratification that leads to that "aha!" moment.
Without that, it's all too rare for someone to push on and learn the
nuances of "local" or creating their own functions or when to move
handlers out of the stack script and into various objects.

The training wheels are very important, but xtalk also offers the
possibility the grow and improve and explore.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list