[self-interest] deep copy

Jan-Paul Bultmann janpaulbultmann at me.com
Sun Dec 26 23:58:15 UTC 2010


I totally agree that deep copies are generally useless memory and processor hogs that no one ever needs and can be considered bad style :)
But I found a case where it is actualy usefull :D and implementing it when it is actualy hidden somewhere would have sucked ;)
I want to create a transporter that sends objects directly from a self world to a self world, so not necessarily that useful for day to day development. But it might be fun to have a wormhole in the canvas you can drop something on, that will pop up in wormholes on other images. Like self mail :D.
But to enable the serialization of the serializer, it has to work on a copy of itself. For the transporter this is not much of a problem I suppose, since it can simply use the initializers.

Cheers Jan
On Dec 27, 2010, at 12:29 AM, ungar at mac.com wrote:

> 
> We want to make things clear in our heads by casting them as binaries. Thus, we think about shallow and deep copy.
> But, depending on the intended purpose, and the specifics of the problem at hand, the implementations of the object, etc., 
> there are many many many possible "copy" operations that one might want to express.
> 
> Even languages such as Beta, that offer linguistic support for a part-whole hierarchy fail to express situations in which what is to be 
> considered as a part depends on one's perspective. Is the side-view-mirror a part of the door or not? Or is it a part of the electrical system??
> 
> Does deep copy mean that I get a whole new world of objects? A whole second computer I could give to Randy Smith to play with??
> If I deep copy a collection, should I get "copies" of immutable objects?? What about reflective operations?
> 
> Self offers great support for copying: just write whatever kinds of copies you need, whether they be one, two, or 17.
> If you want a part-whole hierarchy, you can add (at the Self level) to annotations information about part-whole.
> Or you can program it at the base level however you like.
> 
> Self was designed to support creativity. Don't blinker yourself by lamenting its lack of support for a few myopic features found in
> today's grab-bag languages. Invent something new and better, and you will find it easy to do in Self.
I was not lamenting, sorry if it sounded like that :)
> 
> - David
> 
> 
> 
> On Dec 26, 2010, at 3:20 PM, Jan-Paul Bultmann wrote:
> 
>>  
>> I think I deserved it :D hrhr
>> 
>> cheers
>> On Dec 27, 2010, at 12:18 AM, ungar at mac.com wrote:
>> 
>>> Deep copy is a fallacy.
>> 
>> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20101227/a9c50540/attachment.html>


More information about the Self-interest mailing list