Specifying C++ symbols in C++ namespaces

Dicebot public at dicebot.lv
Sat Apr 5 05:07:34 PDT 2014


On Saturday, 5 April 2014 at 08:42:27 UTC, Ola Fosheim Grøstad 
wrote:
> On Friday, 4 April 2014 at 22:17:45 UTC, Dicebot wrote:
>> #2 should not compile. D currently does not have any notion of 
>> namespaces other than modules / aggregates and I am against 
>> introducing those just for the sake of interfacing with C++.
>
> If you want to interface with C++ you should do it well or not 
> at all. In C++ namespace names reside in their own namespace 
> which means that you get short names like "std", "qt" etc. 
> Which in turn means you have to rename those to "CPPstd", 
> "CPPqt" etc in D in order to disambiguate the symbols. Having a 
> dedicated namespace operator would be a lot more convenient.

D has own tools to disambugate symbols. Introducing new ones is 
equivalent to admitting D module system does not work by design.


More information about the Digitalmars-d mailing list