Copy Constructor DIP and implementation

Neia Neutuladh neia at ikeran.org
Tue Sep 11 15:41:25 UTC 2018


On Tuesday, 11 September 2018 at 15:22:55 UTC, rikki cattermole 
wrote:
> Here is a question (that I don't think has been asked) why not 
> @copy?

It's not wrong to call this an implicit constructor since it's 
called implicitly. It also means that, if we get implicit 
constructors in general, we can keep the same syntax and 
annotations, and it will be consistent.

> Also can we really not come up with an alternative bit of code 
> than the tupleof to copying wholesale? E.g. super(other);

That would be possible, but it would be inconsistent with super 
constructors in general.


More information about the Digitalmars-d-announce mailing list