in reply to Are global variables "bad"?
In your case it really comes down to what you think this program will look like a few years from now. If you think it will be about the same size, etc. then I would continue with what you have. If you think there is a good chance it will turn into a much larger and much more complex program then avoiding globals would likely be a better choice. Also, if you do not have a lot of OO experience then you should consider how that will delay your project and how likely you will introduce different types of issues due to that lack of experience.
I guess what I am trying to say is that you should avoid using globals for sound technical reasons instead of fear and cargo cult culture.
Note: I assume by "global" you mean variables declared in the main:: scope (as opposed to e.g. "our" variables).
Elda Taluta; Sarks Sark; Ark Arks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Are global variables "bad"?
by jpearl (Scribe) on Apr 21, 2009 at 21:47 UTC | |
by Argel (Prior) on Apr 21, 2009 at 22:40 UTC |