DIP61: Add namespaces to D

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 15:20:41 PDT 2014


On 04/27/2014 12:03 AM, David Nadlinger wrote:
> On Saturday, 26 April 2014 at 21:57:55 UTC, Timon Gehr wrote:
>> Which is all the DIP adds. I do not really understand the objections.
>
> It adds a new language feature, which is not just used only in a rather
> specific situation, but also very likely to be confused with the
> eponymous feature from other languages. Just add the C++ mangling
> functionality to mixin templates using a pragma/attribute and be done,
> no need to add a whole new language primitive.
>
> David

I.e.

mixin template SpareIdentifier(){
     // ...
}

extern(C++) pragma(namespace) mixin SpareIdentifier foo;



More information about the Digitalmars-d mailing list