Which option you choose depends on issues like how far separated the elements that need to access the value are logically, how concerned you are with code clarity, whether this is a one-off, whether this is getting distributed, how big the project is, etc. Just keep in mind that nearly every program has a life cycle that is completely different than you think it will be.
I'm sure this list is incomplete - anyone care to add some TIMTOWTDI? There's also providing the fully qualified package name on every access, but that has no benefit I can see over 1. and has some clear issues.
In reply to Re^3: a global hash?
by kennethk
in thread a global hash?
by jpolache
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |