[self-interest] deep copy

ungar at mac.com ungar at mac.com
Sun Dec 26 23:29:44 UTC 2010

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.

- 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/20101226/11bc3ea1/attachment.html>

More information about the Self-interest mailing list