Issues about delegation
Mike Austin
mike_ekim at yahoo.com
Thu Nov 6 18:29:15 UTC 2003
--- In self-interest at yahoogroups.com, Steve Dekorte <steve at d...>
wrote:
>
> On Nov 5, 2003, at 9:57 PM, James McCartney wrote:
> > Then how would you mutate a field in the parent if it always
> > creates a field in the 'instance'?
>
> One way is to reference the parent:
>
> self proto someValue = 1
>
> If you need to always reference a particular parent, then it might
> be best to add a slot with a reference to that parent:
>
> Foo init = method(
> self foo = self
> )
> ...
>
> Bar = Foo clone
> Bar doStuff = method(
> self foo value = 1
> )
>
> -- Steve
Exactly :)
-- Mike
More information about the Self-interest
mailing list