Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Perhaps a better way to say it is not that globals are bad, but that globals are easy to use badly. I often find that I am suspicious when I run across global variables (and now Singletons) in code that is larger than a single script. I know (from much painful experience) that the globals are likely to be the focus of surprising behavior from changes due to unrelated code. Personally, I learned this not from any CS classes, but from being bitten a few times too many.
G. Wade
In reply to Re^2: Are global variables "bad"?
by gwadej
|
|