Hello,
Maybe this is an extreme point of view - but don't you think it's inconsistent that you can't have a parent slot 'implemented' as a method? OK - so it might be a bit slow - you'd have to call the parent slot method(s) for an object for every message it received.
Does anyone agree?
Ivan.
Ivan,
Here's an interesting coincidence -- I sent this message within the group just before you sent yours to self-interest.
Date: Tue, 28 Jun 1994 00:32:10 +0800 From: mario (Mario Wolczko) Content-Type: text Content-Length: 551
The VM allows you to create an object which has a parent slot that contains a method: VM# (| a* = (| x = 3 | self ) |) <16>: ( | a* = <a method>. | ) VM# 16 _AsObject a <16>: ( | a* = <a method>. | ) VM# 16 _AsObject x 3: ( | ^ parent* = <10>. | )
It will come as no surprise that ui1 gets very confused by this object! You can't bind keyword and binary slots like this, which leads me to suspect that it's a bug and not a feature :-)
The semantics of this are as I would expect: that the method's slots are inherited, but the method is activated only when a message is sent naming its slot.
-Mario
self-interest@lists.selflanguage.org