std.compress

Peter Alexander peter.alexander.au at gmail.com
Tue Jun 4 02:52:12 PDT 2013


On Tuesday, 4 June 2013 at 09:11:49 UTC, monarch_dodra wrote:
> On Tuesday, 4 June 2013 at 08:33:29 UTC, Peter Alexander wrote:
>> 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.
>
> Is this according to the specs though, or a bug? It was my
> understanding that another module's private symbols should not
> even be "seen" ?

Well, the fix is currently in an unapproved DIP. I have no idea 
whether Walter intends to accept it or reject it. The discussion 
thread just seems to have died off.

http://wiki.dlang.org/DIP22


More information about the Digitalmars-d mailing list