more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Globals are bad in just about any programming language because it's so easy to tinker with the value wherever you are in the code. The flipside of that is, when Something Bad happens in the code, you have no idea where that global is being changed. A better coding style involves limiting a variable to the smallest possible scope, like within a small piece of code, such as within an object definition, where you can control the setters and getters of the object's attributes. And if you need a rule, it's probably something like "Global variables should be the exceptions, not the rule". Alex / talexb / Toronto "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds In reply to Re^3: Ssh Keys
by talexb
|
|