Classes as Packages (was: Harvesting infrastructure)

Nathanael Schärli n.schaerli at gmx.net
Tue Nov 19 18:46:39 UTC 2002


Anthony,

I completely agree with you. The way 'super' is bound really is the
crucial difference (it's amazing that you were able to say that in two
sentences and I needed 2 pages ;). 

In MI, "super" is lexically bound and may refer to any superclass. In
Traits, it is dynamically bound and always refers to the superclass, but
never to other Traits. In order to refer to overridden methods in
Traits, we need to use aliases.

Cheers,
Nathanael

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Anthony Hannan
> Sent: Tuesday, November 19, 2002 6:28 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: RE: Classes as Packages (was: Harvesting infrastructure)
> 
> 
> Hi Nathanael, thanks for your thorough explanation.  You have 
> clarified the crux of the difference between Traits and 
> stateless MI.  'Super' is lexically bound in MI, but 
> dynamically bound in Traits.  Otherwise Traits and stateless 
> MI are basically the same thing.  Maybe they can be made more 
> alike by using a single type of a behavior object and single 
> type of combination rules, instead of two different kinds 
> (class and traits, inheritance and nesting).  Then add a way 
> to specify "dynamic" super.  I don't have anything in mind 
> now, but I'll think about it.
> 
> Cheers,
> Anthony
> 




More information about the Squeak-dev mailing list