What is the case against a struct post-blit default constructor?
Simen Kjaeraas
simen.kjaras at gmail.com
Thu Oct 11 08:15:47 PDT 2012
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
More information about the Digitalmars-d
mailing list