[self-interest] Issues about delegation
Jecel Assumpcao Jr
jecel at merlintec.com
Wed Nov 5 19:29:52 UTC 2003
On Wednesday 05 November 2003 16:27, J. Baltasar GarcĂa Perez-Schofield
wrote:
> > ["copy-on-write" slots]
>
> I see. So, the "general" solution would be to copy all
> inherited attributes.
Actually, in that kind of system you don't copy anything until someone
tries to change it. So the "instances" might end up all looking
different from each other depending on their history.
> I understand. Is 'traits' a way to distinguish between
> prototype objects ("classes") and "instance" objects ?
It is a separate namespace - you can have both 'traits person' and
'prototype person' in the system, but since 'prototype*' is a parent
object in the 'lobby' object you can just say 'person' in the second
case.
The "traits" are more like the classes while the prototypes are more
like instances. The objects you clone from them look exactly like them
(since we don't have the "copy-on-write" slots mentioned above). In
fact, a prototype should be a fully functional "instance" which is why
I decided to give it a name like 'John Doe' instead of ''. Prototypes
are special in some languages, but not in Self.
-- Jecel
More information about the Self-interest
mailing list