That's perfectly fine in many cases; it's as much a singleton as anything else.
One potential drawback is that it's possible to overwrite a global variable, though. If you use some sort of closure to store the singleton, you'll have less chance of overwriting the variable accidentally.
In reply to Re: Re: Sharing objects between modules
by chromatic
in thread Sharing objects between modules
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |