Copy constructor in D. Why it is necessary to have it.

Bill Baxter wbaxter at gmail.com
Tue Sep 30 15:00:53 PDT 2008


On Wed, Oct 1, 2008 at 6:53 AM, bearophile <bearophileHUGS at lycos.com> wrote:
> Bill Baxter:
>> I like clone.  It's used pretty commonly in other languages.
>
> Java?
>

I've seen it used in C++ libs too.

>> I'd rather not follow up one slightly odd-ball name with an even more
>> bizarre one.  But it's not gonna be anything more than a convention
>> anyway, so you're free to name it .deepdup if you like in your
>> libraries.
>
> If the D convention is clone I'll use clone! :-) Using different conventions is generally bad.

There is no real convention at this point.  Has anyone seen a D
library that contains a way to make deep copies of its objects?

--bb



More information about the Digitalmars-d mailing list