On 2012-10-11, 15:52, deadalnix wrote:

Le 11/10/2012 14:19, Andrei Alexandrescu a écrit :

We could (after all, C++ does it). There are a few disadvantages to
doing so, however.

1. Defining static data is more difficult. Currently, all static data is
statically-initialized. With default constructors, we'd need to define
the pre-construction state of such objects anyway, and then change the
compiler to call constructors prior to main(). I find the current design
simpler and easier to use.


CTFE is probably the answer here.

But not all functions are CTFE-able, so it's not a solution in all cases.

--
Simen

Reply via email to