October 31, 2005Re: a slew of questions about D...
Posted in reply to Bruno Medeiros
On Mon, 31 Oct 2005 15:14:15 +0000, Bruno Medeiros <daiphoenixNO@SPAMlycos.com> wrote: > Regan Heath wrote: >> On Mon, 31 Oct 2005 00:30:17 -0500, clayasaurus <email@example.com> wrote: >> >>> It also appears that the = operator in D is not overloadable. Should I settle with a function called 'deepCopy()' ? >> I would call it "dup" as that is what arrays use for a deep copy. >> Regan > Arrays don't have the two concepts of shallow copy or deep copy, only of simple copy/duplication, which, if compared to object cloning/copying, would be 'equivalent' to shallow copying, not deep copying (but such comparision should not be made in the first place). You're right, of course. Regan
November 02, 2005Re: a slew of questions about D...
Posted in reply to clayasaurus
"clayasaurus" <firstname.lastname@example.org> wrote in message news:email@example.com... > It also appears that the = operator in D is not overloadable. Should I settle with a function called 'deepCopy()' ? One of the reasons '=' is not overloadable is because of endless confusion over whether it should be a deep or a shallow copy. By all means, if you're doing a deepCopy(), name it that!
Copyright © 1999-2016 by Digital Mars ®, All Rights Reserved