Issues about delegation
Mike Austin
mike_ekim at yahoo.com
Thu Nov 6 03:34:23 UTC 2003
--- In self-interest at yahoogroups.com, "J. Baltasar GarcĂa Perez-
Schofield" <jgarcia at e...> wrote:
[snip]
> These two objects, joe2, and mary2, share the shame
> String, because both objects have a "parent" attribute pointing to
> Person. Worst of all, joe2 and mary2 are actually modifying a
> prototype (an object which is playing the role, in this case, of a
> class).
>
> How can I solve this ?
I think the most simple solution is to use create-on-assign, where a
slot is created in the 'instance' only when you assign a value. This
saves space and also is a more generic solution.
I have a test runtime system right now that works well like this,
although I haven't tested large programs. I'm trying to avoid using
things such as traits to keep it simple. mybutton is-a Button is-a
View is-a Object. Each 'instance' is simply a specialization. I
don't know if this will work in the end, but it's what I'm going for.
-- Mike
More information about the Self-interest
mailing list