[self-interest] parent arguments
Russell Allen
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,
> but
> a quick search in this list's archives seems to indicate that we
> haven't.
>
> Officially Self has something that I am calling "parent arguments"
> in
> this email. We tell that story that when a lookup finds a method as
> some
> 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
> the
> 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
> receiver.
>
> 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
> the
> source text is parsed into a special bytecode instead of as a send
> one).
>
> 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
> that
> 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
> reassigned
> to some other object at any time while the proposed parent argument
> slot
> 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?
Russell
>
> -- Jecel
>
>
>
> Links:
> ------
> [1] mailto:jecel at merlintec.com?subject=Re%3A%20parent%20arguments
> [2]
> mailto:self-interest at yahoogroups.com?subject=Re%3A%20parent%20arguments
> [3]
>
> http://groups.yahoo.com/group/self-interest/post;_ylc=X3oDMTJwNjhtN2NrBF9TAzk3MzU5NzE0BGdycElkAzExMTQ4MzUEZ3Jwc3BJZAMxNzA3Mjc2NzE4BG1zZ0lkAzI3OTMEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMzIzNzMyMzM5?act=reply&messageNum=2793
> [4]
>
> http://groups.yahoo.com/group/self-interest/post;_ylc=X3oDMTJlamZwaXRrBF9TAzk3MzU5NzE0BGdycElkAzExMTQ4MzUEZ3Jwc3BJZAMxNzA3Mjc2NzE4BHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTMyMzczMjMzOQ--
> [5]
>
> http://groups.yahoo.com/group/self-interest/message/2793;_ylc=X3oDMTM0OGk1bmtoBF9TAzk3MzU5NzE0BGdycElkAzExMTQ4MzUEZ3Jwc3BJZAMxNzA3Mjc2NzE4BG1zZ0lkAzI3OTMEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMzIzNzMyMzM5BHRwY0lkAzI3OTM-
> [6]
>
> http://groups.yahoo.com/group/self-interest/members;_ylc=X3oDMTJmNWM1Y29rBF9TAzk3MzU5NzE0BGdycElkAzExMTQ4MzUEZ3Jwc3BJZAMxNzA3Mjc2NzE4BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEzMjM3MzIzMzk-?o=6
> [7]
>
> http://groups.yahoo.com/group/self-interest;_ylc=X3oDMTJlNTBjZnBoBF9TAzk3MzU5NzE0BGdycElkAzExMTQ4MzUEZ3Jwc3BJZAMxNzA3Mjc2NzE4BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTMyMzczMjMzOQ--
> [8]
>
> http://global.ard.yahoo.com/SIG=15ov15o44/M=493064.14543979.14562481.13298430/D=groups/S=1707276718:MKP1/Y=YAHOO/EXP=1323739539/L=9a021bc8-2518-11e1-88e2-3f524ce26b06/B=6YiLOtBDRyM-/J=1323732339155894/K=l4yM5w7LZRGIFDHAOu3NkQ/A=6060255/R=0/SIG=1194m4keh/*http://us.toolbar.yahoo.com/?.cpdl=grpj
> [9]
>
> http://groups.yahoo.com/;_ylc=X3oDMTJkMDM3aHNqBF9TAzk3MzU5NzE0BGdycElkAzExMTQ4MzUEZ3Jwc3BJZAMxNzA3Mjc2NzE4BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMzIzNzMyMzM5
> [10]
>
> mailto:self-interest-traditional at yahoogroups.com?subject=ChangeDeliveryFormat:Traditional
> [11]
> mailto:self-interest-digest at yahoogroups.com?subject=EmailDelivery:Digest
> [12]
> mailto:self-interest-unsubscribe at yahoogroups.com?subject=Unsubscribe
> [13] http://docs.yahoo.com/info/terms/
More information about the Self-interest
mailing list