Jarrett Billingsley wrote:
On Sun, May 31, 2009 at 4:39 PM, Walter Bright
<newshou...@digitalmars.com> wrote:
The solution is relatively robust and straightforward. Create a third
module, AB. Module A and module B both import AB. Put the static
constructors for both A and B in module AB. The order of initialization
problem is robustly solved, and all the interdependencies of initialization
of A and B are explicitly laid out in AB.

If I might speak from personal experience, what usually ends up
happening instead is that A and B get merged into a single module.
This happens enough times, and you have half your code in one file.

What is wrong with the approach I outlined? I use it, it works fine.

Reply via email to