DIP61: Add namespaces to D
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 26 16:38:06 PDT 2014
On Saturday, 26 April 2014 at 23:35:44 UTC, Walter Bright wrote:
> 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.
Well this is only reason why I am not adamant about this and
eager to compromise ;)
Still, providing tool that does C++ .h to .di conversion but does
idiomatic adaptation to D module system sounds like a better
long-term solution which will benefit both existing D
infrastructure and interests of C++ programmers.
More information about the Digitalmars-d
mailing list