shorter alternative of constructor with parameter

Gary Willoughby via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 23 11:10:56 PDT 2014


On Saturday, 21 June 2014 at 18:50:23 UTC, Xinok wrote:
> I'd prefer that we didn't crowd the language with minor 
> shortcuts like these, and save syntactic sugar for more useful 
> features. Plus, it would be easy enough to make a string mixin 
> which generates such boilerplate code.

I agree please don't add shortcuts like this that really don't 
add anything other than more complexity. Please keep D simple and 
clean to read and have to always guess what shortcuts are being 
used.

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


More information about the Digitalmars-d mailing list