Global vars
I wonder how much global vars are "allowed" for programs. I always thought they are a symbol of bad programming knowledge.
Unfortunately there is no right answer to that. Some believe that globals should be avoided at all cost, as they are a sign of bad design and break code reusability. Others believe that globals are easier to code and allow for faster access to widely used variables.
Personally I avoid them at all costs. Any code that uses a global variable can no longer be reused without code changes (unless you always use the same global variables AND naming convention for every project
).
- Houdini
Edited by - Houdini on May 31, 2001 4:51:23 PM
Personally I avoid them at all costs. Any code that uses a global variable can no longer be reused without code changes (unless you always use the same global variables AND naming convention for every project
![](wink.gif)
- Houdini
Edited by - Houdini on May 31, 2001 4:51:23 PM
- Houdini
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement