public import and bugs it causes

div0 div0 at
Sat May 15 06:47:56 PDT 2010

Hash: SHA1

Simen kjaeraas wrote:
> div0 <div0 at> 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
> other.

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.
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


More information about the Digitalmars-d mailing list