Namespace clash between modules

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Tue Aug 13 14:47:33 PDT 2013


On Tuesday, 13 August 2013 at 16:10:19 UTC, Marek Janukowicz 
wrote:
> I implemented some generic logging module and want to use 
> single Logger
> object per module. Some simplified excerpt from my code:
>
> module log;
> mixin template makeLogger( params,,, name ) {
>   Logger logger;
>   static this () {
>   .. logger initialization...
>   }
> }

I would expect that even if you solve the name clash you'll run 
into issue with having a static this() in every module. (in some 
situations D can't decide which static this() to execute first.)


More information about the Digitalmars-d-learn mailing list