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

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 28 08:42:47 PDT 2014


On Mon, 28 Apr 2014 11:32:50 -0400, Dicebot <public at dicebot.lv> wrote:

> On Monday, 28 April 2014 at 14:27:19 UTC, Steven Schveighoffer wrote:
>> void main()
>> {
>>    func(); // error
>>    foo.func(); // ALSO error
>>    bar.func(); // Not error, BUT it's actually calling foo::func from  
>> C++ land!
>> }
>
> I don't see any fundamental issue here because you can still use renamed  
> imports to disambiguate any call. However it does feel extremely dirty  
> from the reading clarity point of view and can be a good reason to  
> prohibit naive usage of namespaces in D code in same way as modules.

Yes, but this proposal gets extra negative points for forcing you to  
rename your D module for the sake of C++ imports :)

For something like std.string, I can't imagine it will be pleasant.

-Steve


More information about the Digitalmars-d mailing list