DIP61: Add namespaces to D

No via Digitalmars-d digitalmars-d at puremagic.com
Sun Apr 27 03:02:43 PDT 2014


On Sunday, 27 April 2014 at 00:21:19 UTC, Aleksandar Ruzicic 
wrote:
> On Saturday, 26 April 2014 at 23:32:42 UTC, Walter Bright wrote:
>> Since the namespace keyword doesn't seem to be gaining much 
>> traction, an alternative syntax would be:
>>
>>    extern (C++, N.M) { void foo(); }
>>
>> which would be semantically equivalent to the previous:
>>
>>    extern (C++) namespace N { namespace M { void foo(); }}
>
> Or maybe reuse existing keywords:
>
>     extern (C++) scope N.M { void foo(); }
>
> or
>
>     extern (C++) module interface N.M { void foo(); }
>
>
> or something along those lines.. but maybe it should look a bit 
> ugly :)


  extern (C++)!("N.M") { void foo(); }

;)


More information about the Digitalmars-d mailing list