static this(), interdepencies, and bootstrapping
Lutger
lutger.blijdestijn at gmail.com
Sun Aug 3 09:05:28 PDT 2008
Derek Ney wrote:
...
> I know that this "ordering" of static this() calls was added to 2.0
> presumably because people did not like the non-deterministic order in
> which they were called. But for my application, there is no way I can get
> rid of the "circular" nature (except for putting every single class into
> one gigantic file). Is there some trick that someone has for me to get an
> order independent static this() like call?
> -Thanks, Derek
You can work around this problem by creating a third module that publicly
imports the two modules with constructors, and import that one inside the
modules with constructors.
More information about the Digitalmars-d
mailing list