struct and default constructor

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 10 21:43:22 PDT 2014


On Saturday, 11 October 2014 at 04:41:52 UTC, Walter Bright wrote:
> On 10/10/2014 5:25 PM, Simon A wrote:
>> D has native functional purity.  Couldn't you get the same
>> benefits that you listed by allowing default constructors but
>> requiring them to be pure?
>
> I suspect that CTFE can accomplish most of that today - with 
> the exception that CTFE will not allocate runtime memory for 
> you.

There is ER somewhere in bugzilla AFAIR about allowing CTFE-only 
struct default constructors.


More information about the Digitalmars-d mailing list