[self-interest] Propogating slot changes in Morphs

J. Baltasar García Perez-Schofield jbgarcia at uvigo.es
Fri Apr 16 09:06:25 UTC 2010



	Hi, there !

> > Ideally I suppose what is needed is a slot which ‘belongs’ to the parent
> > object but which nevertheless can have different values depending on the
> > child.
> 
> Yes, this is similar to how inheritance works in the Io programming 
> language. When you clone an object it doesn't clone the slots. it does 
> copy-on-write in that it creates a copy of the cloned objects slots when 
> you set them on the child. This makes 'data parents' a bit easier to 
> deal with in that you can add new slots to all cloned objects easier.

	This is quite exactly how it works in Zero, the VM, being PROWL the programming language.

	http://trevinca.ei.uvigo.es/~jgarcia/TO/zero/

	When you copy an object, then the copy is a deep one, while you can also create an object as a child of an already existing object (a prototype), and then the copy-on-write mechanism gets into action.

-- Baltasar García Perez-Schofield (jbgarcia at uvigo.es)
Dpt. Informática, Universidad de Vigo, España
http://webs.uvigo.es/jbgarcia/



More information about the Self-interest mailing list