DIP61: redone to do extern(C++,N) syntax

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 29 00:27:10 PDT 2014


On 4/29/2014 12:10 AM, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Tuesday, 29 April 2014 at 06:50:19 UTC, Walter Bright wrote:
>>> No, it'll happen if they use the same vector library an #include the same
>>> "vector3D" and independently specify their own binding? But if they cooperate
>>> and use the same binding, then you are ok? That makes no sense.
>>
>> I simply don't know what you're talking about when you use the word "binding".
>
> You bind the C++ extern to a D path, and as a result you get 2 types because you
> have 2 paths rather than one. (according to what you have said)
>
> If they mangle to the same name then I want them to be the same type.

The namespace contributes to the mangling of C++ symbols, but has no 
contribution to its type.


> As a result I am better off when using pure C++ frameworks and creating my own D
> layer than when I am using 2 mixed D/C++ frameworks that have been developed
> independently.
>
>> C++ identifiers do not get the module name mangled in.
>
> An therefore they should be seen as the same type!

The type is not a scope.


More information about the Digitalmars-d mailing list