How about:

--
pure static this()
{
  // Code
}
--

That is, pure at module level (doesn't depend on any other modules).
Ordering can be done as before, we just need to add a clause in the docs to
define pure module constructors as being run first given a "cyclic
dependancy".

On 2 October 2011 23:42, Jonathan M Davis <[email protected]> wrote:

> On Sunday, October 02, 2011 14:49:26 Walter Bright wrote:
> > On 10/1/2011 9:07 PM, Jonathan M Davis wrote:
> > > It would be really nice though to be
> > > able to just somehow mark one or both of the static constructors or
> > > modules to indicate that the initialization order doesn't matter (or to
> > > tell it which order to use if that's a better solution).
> >
> > If such a feature were added, it would not be allowed in @safe code.
>
> Well, it does kind of scream @trusted, since you're telling the compiler
> that
> what you're doing is safe instead of the compiler figuring it out on its
> own.
>
> - Jonathan M Davis
> _______________________________________________
> phobos mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/phobos
>



-- 
Robert
http://octarineparrot.com/
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to