At 04:13 PM 8/6/00 -0400, Dan Sugalski wrote:
>At 05:31 AM 8/7/00 +1000, Damian Conway wrote:
>>    > >Another one for my wish list: deep copying support built in.  A devil
>>    > >inside me thinks this should be a new assignment
>>    > >operator.  Damian?  Sounds like this is up your alley.  I want to do a
>>    > >sanity check before taking up RFC space.
>>    >
>>    > Regardless of how this looks, it has some pretty significant 
>> ramifications
>>    > for the internals. What, for example, should happen if you 
>> deep-copy a DBI
>>    > object attached to an Oracle database?
>>
>>I would say that encountering an "external component" such as a file handle
>>during a clone() should either shalow copy the component or else throw an
>>exception.
>
>That's cool. I can also see calling a package's CLONE sub if you're 
>cloning something blessed into it. Presumably it'd get the original as a 
>parameter and return the new thing, or something of the sort.

I *really* like this idea.  There should also be a default CLONE for the 
majority of classes that just want ordinary deep copying on whatever object 
representation they're using.


--
Peter Scott
Pacific Systems Design Technologies

Reply via email to