Newbie: copy, assignment of class instances
bearophile
bearophileHUGS at lycos.com
Thu May 27 15:12:00 PDT 2010
Ali:
> For what it's worth, here is a code that uses 'dup' instead of 'copy'.
Oh, right. I have forgotten to say this to the OP. In D it's better to name it dup instead of copy.
>I know this is not the same thing; but I find this more intuitive:<
I agree, it's better for D.
> A dup() const
Probably this is better, seeing your usage of it:
@property A dup() const
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list