| | The Old Joel on Software Forum - Global Variable Subtlety |
 | | Having globals limits reuse, because any code you try and reuse will have to bring the global along with it, which means you need to FIND the darn thing. |
 | | When it is said that global variables are bad, it is not so much the existance of global variables but rather what they are used for. |
 | | Global Variables are said to be bad for all the reasons given previous, they are hard to debug, they make functions have hidden dependencies (the function definition doesn't tell you what it does, without reading it's entire source), they make it impossible to easily extract and re-use some code. |
| discuss.fogcreek.com /joelonsoftware/default.asp?cmd=show&ixPost=43421 (2026 words) |