Hello,
I'm new to Self, so sorry for maybe a stupid question. I have read "Parents are shared parts of objects: inheritance and encapsulation in SELF" by Chambers, Ungar, Chang, and Hölzle and there is spoken about prioritized multiple inheritance by using the amount of "*"s after the slots name.
I tried to use this in the 4.4 Beta and get the error message that there must not be more than one * for a parent slot. Did I made a mistake? Is prioritized inheritance implemented in an earlier release?
Thanks michael
Michael Kusber wrote on Tue, 22 Jun 2010 01:44:05 -0700 (PDT)
I'm new to Self, so sorry for maybe a stupid question. I have read "Parents are shared parts of objects: inheritance and encapsulation in SELF" by Chambers, Ungar, Chang, and Hölzle and there is spoken about prioritized multiple inheritance by using the amount of "*"s after the slots name.
That was implemented in Self 1.0, but removed in Self 3.0 (after these papers were written).
I tried to use this in the 4.4 Beta and get the error message that there must not be more than one * for a parent slot. Did I made a mistake? Is prioritized inheritance implemented in an earlier release?
You have to try Self 1 or 2 (not easy since you would need an old Sun machine) to be able to use these features. The reason why they were removed was that programmers often guessed wrong what method would be found be the lookup algorithm, though in theory it wasn't that complicated. The consequences of removing the tie-breaker-rule and parent priorities were:
1) inheritance could no longer be used to break up large objects into namespaces, which was needed for the first UI. So a scheme of "annotations" was created instead which was used not only for name spaces (the outliner objects in UI2 depend on them) but also for other meta information needed by different tools (like the transporter, which could export objects from a running system to be loaded into another system).
2) privacy was eliminated. The syntax remained and the UI2 reflected it (by showing slot names in bold or not) but the virtual machine ignore it and treated all slots exactly the same. The idea was to later "do it right", which was done in the Us experimental programming language.
3) mixins continued to work well, but other than that multiple inheritance wasn't used as much.
-- Jecel
Hi, there!
I'm new to Self, so sorry for maybe a stupid question. I have read "Parents are shared parts of objects: inheritance and encapsulation in SELF" by Chambers, Ungar, Chang, and Hölzle and there is spoken about prioritized multiple inheritance by using the amount of "*"s after the slots name.
I tried to use this in the 4.4 Beta and get the error message that there must not be more than one * for a parent slot. Did I made a mistake? Is prioritized inheritance implemented in an earlier release?
AFAIK, that feature didn't made it in the final product, due to problems with the rules in charge of deciding which path to follow each time (tie-breaker rule, if I remember correctly).
Anyway, they'll answer you better than me.
-- Baltasar García Perez-Schofield (jbgarcia@uvigo.es) Dpt. Informática, Universidad de Vigo, España http://webs.uvigo.es/jbgarcia/
self-interest@lists.selflanguage.org