Is Anything Holding you back?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 7 08:36:26 PDT 2015


On Wednesday, 7 October 2015 at 14:59:37 UTC, Johannes Pfau wrote:
> I think it wouldn't be hard to implement a solution. I guess 
> it's mainly a political discussion :-(

It should be fairly easy to implement a solution - especially if 
it's simply marking the static constructor to say that it doesn't 
depend on any other module's static constructor having run 
(obviously, it gets far more complicated if you try and make it 
so that the programmer indicates which modules it doesn't depend 
on in order to have other cyclic dependencies caught if they 
creep into the code). druntime just needs to know that the order 
of that static constructor doesn't matter with regards to the 
others when it's deciding the order to run them in. I expect that 
actually making the change to druntime would be pretty simple.

The core problem is definitely that Walter objects to the idea 
(IIRC on the grounds that it's too easy for circular dependencies 
to creep in later and then not be caught). If he agreed to it, it 
could probably be implemented fairly quickly.

- Jonathan M Davis


More information about the Digitalmars-d mailing list