Any way to reproduce Dart style constructors?

Seb via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 25 05:16:26 PDT 2017


On Thursday, 25 May 2017 at 11:31:43 UTC, ag0aep6g wrote:
> On 05/25/2017 12:52 PM, Moritz Maxeiner wrote:
>> [...]
>
> Of course it couldn't be that simple :(
>
> Adam's workaround (`alias __ctor = mixin_thing.__ctor;`) might 
> be workable, though.
>
> [...]

FWIW if this is properly working (e.g. with 11500 fixed), it 
would make a lot of sense to me to add it to Phobos as this looks 
like a very useful piece (useful enough maybe even try a DIP to 
get it into D).


More information about the Digitalmars-d-learn mailing list