[self-interest] parent arguments
mail at russell-allen.com
Tue Dec 13 03:58:06 UTC 2011
On 13.12.2011 11:23, Jecel Assumpcao Jr. wrote:
> Here is a language feature which I thought we had discussed before,
> a quick search in this list's archives seems to indicate that we
> Officially Self has something that I am calling "parent arguments"
> this email. We tell that story that when a lookup finds a method as
> slot's value, we clone that method object transforming it into an
> activation object by changing some of its slots. This includes
> adding a
> special argument slot called "self" which is set to the receiver of
> message. This slot not only behaves like an argument, but it also
> behaves like a parent (which is why it is indicated as :self* in our
> drawings) and allows the method to access all the slots in the
> There is a similar scheme to explain how blocks work, though the
> :* slot doen't have a name that is visible through normal
> message passing (in practice :self* doesn't either since "self" in
> source text is parsed into a special bytecode instead of as a send
> Of course, this isn't at all how things are actually implemented.
> But it
> is the story we tell about the language.
> I was wondering if it wouldn't be interesting to have this as a real
> feature of Self. Any object could have a parent argument slot and
> would get filled in with another object whenever it was cloned. So
> w: myWrapper cloneWith: model.
> would do essentially what we can now do with
> w: myWrapper clone. w mParent: model.
> This alternative supposes that myWrapper includes a parent data slot
> called mParent. The difference is that this data slot can be
> to some other object at any time while the proposed parent argument
> can't be changed (not counting reflection) during that object's
> lifetime. My idea is that this captures an interesting usage pattern
> better than assignable parent slots.
Is this a pattern that you're using a lot? I'm not sure how often I
change an objects parents except at a meta-level through outliners?
> -- Jecel
>  mailto:jecel at merlintec.com?subject=Re%3A%20parent%20arguments
> mailto:self-interest at yahoogroups.com?subject=Re%3A%20parent%20arguments
> mailto:self-interest-traditional at yahoogroups.com?subject=ChangeDeliveryFormat:Traditional
> mailto:self-interest-digest at yahoogroups.com?subject=EmailDelivery:Digest
> mailto:self-interest-unsubscribe at yahoogroups.com?subject=Unsubscribe
>  http://docs.yahoo.com/info/terms/
More information about the Self-interest