Named constructors

Walter Bright newshound2 at digitalmars.com
Thu Jan 10 12:31:55 UTC 2019


On 1/9/2019 9:46 AM, H. S. Teoh wrote:
> It also makes the calling code self-documenting without needing language
> support for named arguments:
> 
> 	auto myPerson = Person(FirstName("John"), LastName("Doe"));

Nailed it :-)


More information about the Digitalmars-d mailing list