Allow this() { } for structs

Ola Fosheim Grøstad ola.fosheim.grostad at
Fri Nov 6 17:44:29 UTC 2020

On Friday, 6 November 2020 at 17:14:27 UTC, IGotD- wrote:
> On Friday, 6 November 2020 at 16:53:32 UTC, Q. Schroll wrote:
>> If T's this() isn't pure, T.init cannot exist.
> Why must T.init and this() be the same thing?

There is no point in having init if you have default 
constructors, then init would just be an optimization.

More information about the Digitalmars-d mailing list