DIP61: Add namespaces to D
Tobias Müller via Digitalmars-d
digitalmars-d at puremagic.com
Sun Apr 27 01:48:36 PDT 2014
Walter Bright <newshound2 at digitalmars.com> wrote:
> On 4/26/2014 12:27 PM, Daniel Murphy wrote:
>> We already have a feature to manage conflicts and organisation in D code -
>> modules!
>
> True. But what D doesn't have is a global namespace. I don't propose one
> for D, but C++ symbols may appear in the C++ global namespace, or in a
> C++ namespace. So using D modules to represent C++ namespaces has a problem.
But C++ namespaces and D modules don't have to match at all. You can import
any C++ function from an arbitrary namespace into any D module, just as you
like.
Also, I guess there is a reason, why D doesn't have a global module.
Tobi
More information about the Digitalmars-d
mailing list