Discussion Thread: DIP 1043--Shortened Method Syntax--Community Review Round 1

Elronnd elronnd at elronnd.net
Fri Feb 4 11:21:48 UTC 2022


It would be nice to permit something like this:

struct Foo {
     this(int x, string y) { ... }
     this(string y) => this(0, y);
}

Currently this fails because constructors are not allowed to 
return anything.  But that should not be part of this DIP, 
probably.


More information about the Digitalmars-d mailing list