When Self follows an inheritance chain, will it activate methods in parent slots? That is, if set an Object to have a parent slot containing a method(instead of another object) that returns the object that I want to lookup to continue in, will it work?
Cheers, Steve Io, a small language: http://www.iolanguage.com/
Well, Randy always wanted it to, but we never implemented it.
- Dave
On Saturday, April 5, 2003, at 09:26 PM, Steve Dekorte wrote:
When Self follows an inheritance chain, will it activate methods in parent slots? That is, if set an Object to have a parent slot containing a method(instead of another object) that returns the object that I want to lookup to continue in, will it work?
Cheers, Steve Io, a small language: http://www.iolanguage.com/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
On Sunday, April 6, 2003, at 11:10 PM, David Ungar wrote:
Well, Randy always wanted it to, but we never implemented it.
Thanks for the response. Yeah, I don't like it as it breaks the lookup loop detection scheme used in Self(setting a bit in each object tranversed) as a lookup could cause an activation with might yield to another coroutine.
Cheers, Steve Io, a small language: http://www.iolanguage.com/
Do you have a specific problem in mind that can benefit from this feature?
On Saturday, April 5, 2003, at 09:26 PM, Steve Dekorte wrote:
When Self follows an inheritance chain, will it activate methods in parent slots? That is, if set an Object to have a parent slot containing a method(instead of another object) that returns the object that I want to lookup to continue in, will it work?
On Monday, April 7, 2003, at 01:24 AM, James McCartney wrote:
Do you have a specific problem in mind that can benefit from this feature?
Someone on the Io list was interested in using it to implement private slots. (the parent block would check the sender before deciding which parent to use)
Cheers, Steve Io, a small language: http://www.iolanguage.com/
On Sunday 06 April 2003 02:26, Steve Dekorte wrote:
When Self follows an inheritance chain, will it activate methods in parent slots? That is, if set an Object to have a parent slot containing a method(instead of another object) that returns the object that I want to lookup to continue in, will it work?
Dave has already answered "no", but I would like to consider the practical complications of such a scheme.
Does the method take any arguments? If so, when invoked from the lookup routine instead of a regular program then what will that argument be? If not, then won't the method always reply the same object (same thing as a data slot)?
You might think that a no argument method can return different values since it can send further messages (which is correct) but then you run into a different problem: what if these further messages also need lookup via the very "parent method" we are trying to evaluate?
And all this supposing that each object has a single parent data/method slot. With multiple parents there will be a fantastic number of ways that things can be combined and it will nearly always be impossible to understand what is going on.
A far better way to organize things is to create a proper reflective layer. See CoDA for Smalltalk as an example in which seven different kinds of meta-objects allow you to change any aspect of message passing and inheritance in a modular and understandable way:
http://web.yl.is.s.u-tokyo.ac.jp/~jeff/research/coda.html
-- Jecel P.S.: thanks for the "naked objects" link - it is actually more similar to the eToys viewers in Squeak than outliners in Self
self-interest@lists.selflanguage.org