On Wednesday, 7 October 2015 at 07:08:39 UTC, extrawurst wrote:
Method 1: Adding a static c'tor to every module does not work very long in practice (as experienced first handed) cause you are in "cyclic c'tor hell" very quick...

The cyclic dependency checking in druntime makes static constructors almost unusable. It's a case of being protected so much while trying to do something that you can't do what you're trying to do. There really should be some way IMHO to have something similar to @trusted where you tell the compiler/runtime that the order does not matter for a particular static constructor and that it should just trust the programmer on that, but Walter rejected the idea when it was brought up.

- Jonathan M Davis

Reply via email to