DIP61: Add namespaces to D

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 08:19:54 PDT 2014


On 04/26/2014 01:57 PM, Dicebot wrote:
>>
>
> I think this is a very bad proposal. Necessity to define namespaces for
> interfacing with C++ must not result in usage of namespaces of pure D code.

Well, the proposed feature does not add any new capabilities except 
proper mangling. In pure D code

namespace foo{
     // declarations
}

would be basically the same as

private mixin template Foo(){
     // declarations
}
mixin Foo foo;

which is available today. I guess namespaces will occur in pure D code 
as sparsely as the above construction, because they are not particularly 
useful.


More information about the Digitalmars-d mailing list