Is there any good reason why C++ namespaces are "closed" in D?

Walter Bright newshound2 at digitalmars.com
Wed Aug 1 09:12:42 UTC 2018


On 7/31/2018 1:43 AM, Atila Neves wrote:
> It's not the same - if I want to link to std::vector and std::string, I'd expect 
> them to be used in D as std.vector and std.string, not std.vector and 
> HackyDThing0.std.string.

Calling them std.string will already cause problems, because there's an 
std.string in Phobos.

You could call it core.stdcpp.string, analogously to core.stdc.string for string.h.

Keep in mind that with 'alias' names can behave as if they are moved to another 
scope.


More information about the Digitalmars-d mailing list