static this(), interdepencies, and bootstrapping

Manfred_Nowak svv1999 at hotmail.com
Sun Aug 3 14:36:18 PDT 2008


Derek Ney wrote:

> [...] get an order independent static this() like call?

The problem in your example is, that you have cyclic `import's _and_ a 
`static this' in _every_ module of the cycle.

Your example gives you the solution to this problem: move the `static 
this' of at least one module of the cycle into the `module bootstrap'!

This will not break the cyclic `import's, but the fact, that _every_ 
module in that cycle has a `static this'. This latter fact might enable 
a topological sorting of the remaining modules---of course: this is 
true only if your heterarchy of imports of modules with `static this' 
contains only one cycle.

This is the case in your example though.

-manfred 

-- 
Maybe some knowledge of some types of disagreeing and their relation 
can turn out to be useful:
http://blog.createdebate.com/2008/04/07/writing-strong-arguments/



More information about the Digitalmars-d mailing list