DIP61: Add namespaces to D

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 14:32:53 PDT 2014


On 04/26/2014 08:13 PM, Walter Bright wrote:
>>
>> private mixin template Foo(){
>>      // declarations
>> }
>> mixin Foo foo;
>> ... I guess namespaces will occur in pure D code as
>> sparsely as the above construction, because they are not particularly
>> useful.
>
> Yeah, template mixins turned out to be a solution looking for a problem.

I was actually referring to the exact pattern above. I.e. a 
parameter-less mixin template that is mixed in immediately exactly one 
time for the named scope alone. :)


More information about the Digitalmars-d mailing list