View mode: basic / threaded / horizontal-split · Log in · Help
October 31, 2005
Re: a slew of questions about D...
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  
>> <clayasaurus@gmail.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, 2005
Re: a slew of questions about D...
"clayasaurus" <clayasaurus@gmail.com> wrote in message
news:dk4a31$29c1$1@digitaldaemon.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!
Next ›   Last »
1 2 3
Top | Discussion index | About this forum | D home