Cyclic depency with class static ctor

Jarrett Billingsley kb3ctd2 at yahoo.com
Mon Oct 30 12:18:14 PST 2006


"Walter Bright" <newshound at digitalmars.com> wrote in message 
news:ei5kj0$1p2m$2 at digitaldaemon.com...
> Kristian wrote:
>> What if some other syntax would be used to define the order of static 
>> ctors?
>> For example:
>>
>>     import a, b, c;
>>
>>     after a: before c: static this();
>
> I don't think new syntax is justified because Frank's workaround handles 
> the problem nicely.

Except that it makes static ctors entirely useless, since you're just 
emulating them.  You end up going back to the way you did it in other 
languages, and static ctors become a useless feature. 





More information about the Digitalmars-d mailing list