[Self-interest] argument parents (was: general ifTrue)

Russell Allen mail at russell-allen.com
Thu Dec 23 10:54:38 UTC 2021


I did create as part of something I was playing with objects which had a defined mutation stage, ie they were immutable but understood ‘copyMutating:blk’ 

a: someImmutableObject.
b: a copyMutating: [|:c |  “ c is the new changeable copy of a “
    c someSlot: newValue].
b “ b is now the changed immutable object “

You can do it pretty easily with mirrors (like everything else).

Russell

> On 23 Dec 2021, at 8:09 pm, kjx <kjx at ecs.vuw.ac.nz> wrote:
> 
> for what it's worth, I now thing this is one of the inherent weaknesses
> of the Self model - not just for arguments, but even for any constant slot:
> there's no good way to make "per-instance" constant slots.
> 
> Consider points - Self points are logically immutable, 
> but they have to be declared with mutable slots. 
> 
> This is why Grace ended up going with Emerald style object creation expressions
> (which are pretty much anonymous classes) rather than cloning prototypes.
> 
> I guess you could have slots with semantics where
> - cloning the object automatically uninitialises them in the clone,
> - once assigned/initialised they cannot be re-initialised.
> 
> Hmm.
> 
> Merry Christmas / Happy Holidays / God Yul / Happy New Year / etc everyone - James
> 
>> On 17/12/2021, at 6:54AM, Jecel Assumpcao Jr <jecel at merlintec.com> wrote:
>> 
>> I noticed that I did not actually ever change a parent after I had
>> cloned an object. Perhaps that use case would be better expressed as
>> setting a value of an argument once and for all, like in theory :self*
>> is set when the activation is created?
> 
> _______________________________________________
> Self-interest mailing list
> Self-interest at lists.selflanguage.org
> http://lists.selflanguage.org/mailman/listinfo/self-interest



More information about the Self-interest mailing list