--XMCwj5IQnwKtuyBG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

As I understand things:

* Variables whose names have no leading sigil have local scope.

* Instance variables are local scope for the particular instance of a
  class within which they "live".

* A Ruby program's "global" scope is actually the scope of an instance of
  Object (or, under certain circumstances, maybe it could be an instance
  of something further down the class inheritance hierarchy . . . ?).

As such, it seems that within your program's "global" scope (not truly
global, but close enough for government work in most cases), the
effective difference between variables named foo and @foo is nothing but
one character.  Is there some technical difference that might have an
effect on the "behavior"[0] of the code I write, as long as neither of
them is being exported to some other running code or enclosed in a more
restricted scope within my program?

## NOTES

[0]:  Someone actually flamed me for referring to the "behavior" of some
code, once upon a time -- thus the scare quotes around behavior in this
case.

--=20
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

--XMCwj5IQnwKtuyBG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk3mbRUACgkQ9mn/Pj01uKUdBQCcD958a00GilSXqYyy6/WzLyeo
vEoAnA2PLt/c+XXtp+F+QAOEhO/DlF9T
=7izM
-----END PGP SIGNATURE-----

--XMCwj5IQnwKtuyBG--

As I understand things:

* Variables whose names have no leading sigil have local scope.

* Instance variables are local scope for the particular instance of a
  class within which they "live".

* A Ruby program's "global" scope is actually the scope of an instance of
  Object (or, under certain circumstances, maybe it could be an instance
  of something further down the class inheritance hierarchy . . . ?).

As such, it seems that within your program's "global" scope (not truly
global, but close enough for government work in most cases), the
effective difference between variables named foo and @foo is nothing but
one character.  Is there some technical difference that might have an
effect on the "behavior"[0] of the code I write, as long as neither of
them is being exported to some other running code or enclosed in a more
restricted scope within my program?

## NOTES

[0]:  Someone actually flamed me for referring to the "behavior" of some
code, once upon a time -- thus the scare quotes around behavior in this
case.

--=20
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk3mbRUACgkQ9mn/Pj01uKUdBQCcD958a00GilSXqYyy6/WzLyeo
vEoAnA2PLt/c+XXtp+F+QAOEhO/DlF9T
=7izM
-----END PGP SIGNATURE-----