public import and bugs it causes
div0 at users.sourceforge.net
Sat May 15 06:47:56 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Simen kjaeraas wrote:
> div0 <div0 at users.sourceforge.net> wrote:
>> Actually C# does have global variables;
>> any public static member of a class is a global variable.
> And here we are down to arguing semantics. Is a variable
> global if it does not pollute the global namespace?
Yes it is. Global means having a single address in the application's
static data segment and accessible to all functions & threads.
> I believe this to have been Alex's intention, and it is
> a fairly common definition of global variable.
It's a fairly common mistake.
> One could certainly argue otherwise, but I hardly see the
> value in such a discussion, be the truth this way or the
Importing symbols into your codes current scope is entirely
different from discussion of global vars. It doesn't need to be a
global variable to cause the same problems, it can be a class or a
function. The problem as stated is about name high jacking, which you
yourself have pointed out in one of your later posts.
My enormous talent is exceeded only by my outrageous laziness.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Digitalmars-d