DIP61: Add namespaces to D

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 16:35:31 PDT 2014


On 4/26/2014 2:45 PM, Dicebot wrote:
> On Saturday, 26 April 2014 at 20:17:45 UTC, Walter Bright wrote:
>> On 4/26/2014 1:06 PM, Jacob Carlborg wrote:
>>> BTW, can't we just handle this automatically in a tool like DStep, with the help
>>> of pragma(mangle).
>>
>> Just setting the name mangling is not enough. There's also the issue of how
>> does one refer to A.B.foo() rather than C.D.foo() ?
>
> By putting first foo in A/B.d and second foo in C/D.d

Unfortunately, C++ programmers don't use namespaces in a way that corresponds to 
the .h file names. By forcing them to lay out their D interface files quite 
differently than their .h files, it puts a large burden on them.


More information about the Digitalmars-d mailing list