in reply to Re^2: Are global variables "bad"?
in thread Are global variables "bad"?
I don't actually see any particular reason to use a singleton in this case: You are parsing a file, and want to store it someplace. There is no particular reason (from what you've said) why parsing a different file, or even reparsing the file should be prevented. (Besides the fact of memory useage/speed, which to me isn't a reason for a singleton, just a reason to keep using the same object.)
Basically, it's extra complexity to prevent future uses. I don't see why either would be something you want.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Are global variables "bad"?
by Porculus (Hermit) on Apr 21, 2009 at 19:38 UTC |