From: Chad Perrin Date: 2011-05-18T07:45:36+09:00 Subject: Re: need help with "module" and variable --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 18, 2011 at 06:57:59AM +0900, 7stud -- wrote: > Don't use global variables--ever. =46rom what I've seen, whenever someone uses a global variable, it's because the person washaving difficulty figuring out how to get data from one scope into another (and sometimes back again). It's true that using global variables is pretty much never the right answer, if for no other reason than the fact it can cause issues if there are two globals with the same name. So, yeah, yours is decent advice. There's just one problem: when people say "don't use globals" and leave it at that, they give the people who used globals no ideas what other recourse they have available to them. Don't just say "don't use global variables". Try saying "You could do this other thing instead, to get what you need without using a global variable." --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --J/dobhs11T7y2rNN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk3S90wACgkQ9mn/Pj01uKVb+ACg2RSm1Db7QI3SciMa88VO5H6q PiYAn3yj2Pp94M1SwC/AMcEV2HhF3GgL =gmbL -----END PGP SIGNATURE----- --J/dobhs11T7y2rNN--