std.compress
Peter Alexander
peter.alexander.au at gmail.com
Tue Jun 4 01:33:28 PDT 2013
On Tuesday, 4 June 2013 at 08:23:52 UTC, Walter Bright wrote:
>> You should also mangle the name so that it doesn't
>> pollute the unqualified symbol namespace (either that or fix
>> visibility of
>> private symbols).
>
> If it proves useful, it will be moved into some more proper and
> public place.
>
> I think it's a bad idea to 'mangle' the name. First off, if it
> is private, it is not visible. And even being public, the
> anti-hijacking language features make it a non-problem. The
> whole point is to avoid the wretched C problems with a global
> name space, by not having a global name space.
import std.compress;
import mylib.circularbuffer;
CircularBuffer!(ubyte[1024]) buf;
ERROR: conflicting names, even though std.compress.CircularBuffer
is private! I have to fully qualify CircularBuffer, or use alias
to get around the problem.
D may not have a global namespace, but it does have unqualified
name lookup, and private symbols still pollute that
pseudo-namespace.
More information about the Digitalmars-d
mailing list