Fri, 19 Dec 2008 04:07:40 -0500, Kagamin wrote: > Derek Parnell Wrote: > >> A static constructor (also known as the Module constructor) executes at >> program run-time and not at program compile-time. > > So do C++ static object constructors. Though C++ has syntax sugar, > which helps writing declaration and initialization at the same place.
C++ static object constructors execute at run time except for trivial cases. Essentially C++ provides a sugar for static Foo var; static this() { var = new Foo(); } I wonder if D could do this as well.