Hello,
I just read 'selfPaper.ps' with great interest. It left me pondering one detail, though - which at least I couldn't figure out from the paper:
How is 'clone', which as I understand all objects inherit from the root object, implemented? Spefically, does it perform a shallow or a deep copy of the slots in the receiver... I would assume a deep one of some sorts or else the clones wouldn't be too usable. But what mechanism is then used to prevent clone from recursing to 'parent' via the slot of that name? How about other slots with non-primitive objects?
Thanks in advance!
Timo
How is 'clone', which as I understand all objects inherit from the root object, implemented? Spefically, does it perform a shallow or a deep copy of the slots in the receiver... I would assume a deep one of some sorts or else the clones wouldn't be too usable. But what mechanism is then used to prevent clone from recursing to 'parent' via the slot of that name? How about other slots with non-primitive objects?
Clone is a primitive applicable to (almost) all objects, and it makes a shallow copy. If an object needs a deeper copy, it has to explicitly clone sub-objects.
self-interest@lists.selflanguage.org