static this [was: any tool to at least partially convert C++ to D]

BCS none at anon.com
Wed Mar 10 11:44:22 PST 2010


I just had a crazy thought: how about allow things to explicitly state static-constructor 
dependencies? By default, it would work as it does now, all constructors 
in all imported modules get run before any in this module but if an explicit 
list is given, then only that list need be run first.

My first thought was to only do this at the module level with something like 
this:

module foo.bar : foo.baz, foo.baz; // run first, even thought not imported

import foo.bar;
import foo.bing; // constructors need not be run first

It might be handy to allow finer grained specification of both the ends, 
maybe putting the list per constructor and allowing the list to include classes 
for instance.

-- 
... <IXOYE><






More information about the Digitalmars-d mailing list