DIP61: Add namespaces to D
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 26 12:27:09 PDT 2014
"Walter Bright" wrote in message news:ljgt9v$1psm$1 at digitalmars.com...
> Having a pragma to just add mangling doesn't deal with problems like:
>
> namespace N { int foo(); }
> namespace M { int foo(); }
>
> foo(); // how to specify which one gets called?
>
> I.e. only addressing name mangling does not scale. Need actual scopes,
> too.
We already have a feature to manage conflicts and organisation in D code -
modules! There is no need to add namespaces to do that, and if that's
really what you want it belongs in a completely different discussion.
The thing we can't (easily) do is mangle C++ namespaces, so a feature that
only affects mangling is perfect.
i.e. We don't need namespaces in D, because modules cover that. We only
need namespace mangling.
More information about the Digitalmars-d
mailing list