shorter alternative of constructor with parameter

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 23 11:20:32 PDT 2014


Gary Willoughby:

> As another dev said a template or mixin can be used for this.

I don't think a template/mixin can replace that sufficiently 
well, because you also often want to put some code inside the 
constructor.

Bye,
bearophile


More information about the Digitalmars-d mailing list