<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sounds like differential inheritance to me. :?<div>Cheers Jan<br><div><div>On Dec 13, 2011, at 01:23 AM, Jecel Assumpcao Jr. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">













<div style="background-color: #fff;">
<span style="display:none"> </span>



    <div id="ygrp-text"><p>Here is a language feature which I thought we had discussed before, but<br>
a quick search in this list's archives seems to indicate that we<br>
haven't.<br>
<br>
Officially Self has something that I am calling "parent arguments" in<br>
this email. We tell that story that when a lookup finds a method as some<br>
slot's value, we clone that method object transforming it into an<br>
activation object by changing some of its slots. This includes adding a<br>
special argument slot called "self" which is set to the receiver of the<br>
message. This slot not only behaves like an argument, but it also<br>
behaves like a parent (which is why it is indicated as :self* in our<br>
drawings) and allows the method to access all the slots in the receiver.<br>
<br>
There is a similar scheme to explain how blocks work, though the<br>
:<lexicalParent>* slot doen't have a name that is visible through normal<br>
message passing (in practice :self* doesn't either since "self" in the<br>
source text is parsed into a special bytecode instead of as a send one).<br>
<br>
Of course, this isn't at all how things are actually implemented. But it<br>
is the story we tell about the language.<br>
<br>
I was wondering if it wouldn't be interesting to have this as a real<br>
feature of Self. Any object could have a parent argument slot and that<br>
would get filled in with another object whenever it was cloned. So<br>
<br>
w: myWrapper cloneWith: model.<br>
<br>
would do essentially what we can now do with<br>
<br>
w: myWrapper clone. w mParent: model.<br>
<br>
This alternative supposes that myWrapper includes a parent data slot<br>
called mParent. The difference is that this data slot can be reassigned<br>
to some other object at any time while the proposed parent argument slot<br>
can't be changed (not counting reflection) during that object's<br>
lifetime. My idea is that this captures an interesting usage pattern<br>
better than assignable parent slots.<br>
<br>
-- Jecel<br>
<br>
</p>

    </div>
     

    

</div>



<!-- end group email -->

</blockquote></div><br></div></body></html>