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

Manu turkeyman at gmail.com
Mon Jul 30 04:53:46 UTC 2018


On Sun, 29 Jul 2018 at 20:25, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On 7/29/2018 7:50 PM, Nicholas Wilson wrote:
> > No it doesn't.
>
> I meant that you can today "reopen" namespace scopes by placing them in separate
> modules.

That's not the same thing... you can create a _different one_ with the
same name in a different module.
If you import both modules, the namespaces conflict, so it's
definitely not 'reopening' it as such.

You need to make sure to not name the namespace when specifying
symbols when you import 2 C++ modules, because it becomes ambiguous.


More information about the Digitalmars-d mailing list