[phobos] std.process and std.datetime - circular dependency on OSX
Robert Clipsham
robert at octarineparrot.com
Sun Oct 2 15:52:31 PDT 2011
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 <jmdavisProg at gmx.com> 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
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
--
Robert
http://octarineparrot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20111002/a3c63550/attachment.html>
More information about the phobos
mailing list