[AccessD] Global Vars (was Ambiguous Name)

Kenneth Ismert kismert at gmail.com
Fri Sep 23 15:40:36 CDT 2011


> Drew Wutka:
> A global variable will ONLY fail in the SAME way that a modular or
> procedural variable will.
> ...
> #1.  'A global variable can be changed from anywhere.... so it could get
> a bad value'.  Really?  So let's look at a procedural variable:
> ...
> Holy Division by Zero Batman.  We just 'broke' a procedural variable! ...
>

You're right, but for one TINY difference ... in your procedural example,
you can raise an error up the call chain, and immediately finger the bad
actor.

In all of the global parameter schemes put forth so far, you don't get that.
The failure chain is:
1. Good actor sets global. Time goes past...
2. Bad actor changes global to a 'bad' value, which is accepted without
error...
3. Other actor uses global -- BAM! BIF! POW! error.

But who did the dirty deed? You can't easily tell. This is the crux of the
'globals are bad' arguement.

Without knowing WHO made each change, you're stuck with a tedious debugging
mess.

But again, talking to the 'globals are bad' camp, I say your solutions so
far don't solve the problem. How do you propose fixing the problem?

-Ken



More information about the AccessD mailing list