in reply to Global Vars
For quick & dirty stuff, I don't mind globals a bit. They get to be a problem when the program starts to get too large and complicated. If you ever find yourself using grep to track down usage of a global variable, or when you have a quick reference sheet for your global variables, or when you track down a bug due to reusing a global variable name that you forgot, then you know that your program is past due for some reorganization/refactoring/etc.
I always wonder why quick & dirty programs last longer than the supposedly long-term ones?
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Global Vars
by tbone1 (Monsignor) on Sep 04, 2009 at 13:57 UTC | |
by roboticus (Chancellor) on Sep 04, 2009 at 15:01 UTC |