[self-interest] Issues about delegation

"J. Baltasar García Perez-Schofield" jgarcia at ei.uvigo.es
Wed Nov 5 18:27:22 UTC 2003

         Hi !

>In one kind of prototype based language, such as Io (I think) or
>NewtonScript, you can create local copies of an inherited slot whenever
>you try to change its value. These "copy-on-write" slots are really
>nice when they do what you want since they avoid replicating shared

         I see. So, the "general" solution would be to copy all inherited 

>Self is a bit more conservative so you have to explicitly recreate any
>slots you want a local copy of. The language doesn't have any built in
>feature to help you with that, but the programming environment does
>(see "copy-down slots" in the manuals). The most interesting papers for
>you might be:

         Certainly. I've already printed both. But I wanted to check before 
if this was a real problem, or I was just missing something.

>Here is one possible organization of your application in Self -
>      traits person = ( | parent* = traits clonable.
>                          otherStuff....
>      | )
>which looks pretty similar to what it would be in a class based
>language, with the additional complication of having to repeat the
>'name' slot manually

         I understand. Is 'traits' a way to distinguish between prototype 
objects ("classes") and "instance" objects ?

         Thank you for the quick (and wise) answer.      :-)

         Salud !


PBC - J. Baltasar García Perez-Schofield
Dep. Informática, Universidad de Vigo, España (Spain)

More information about the Self-interest mailing list