[squeak-dev] Re: Instance variable access in superclasses.

Greg A. Woods; Planix, Inc. woods at planix.ca
Wed Nov 26 20:32:33 UTC 2008

On 26-Nov-2008, at 1:54 PM, Tony Garnock-Jones wrote:

> Greg A. Woods; Planix, Inc. wrote:
>> I.e. you could sort of create a subclass by simply copying the  
>> whole class definition you wish to inherit from, then modify it to  
>> your liking (this has been done an infinite number of times in uses  
>> of non-OO languages!).  However then you lose the support of the  
>> system to maintain the relationship between the shared parts of the  
>> superclass definition(s) and the subclasses that inherit from it  
>> (or indeed even just between the superclass and its sole subclass  
>> in the case where the superclass is not actually an abstract class).
> Traits?

Maybe.  I don't know.

I definitely don't know how Traits would/could work in Smalltalk and  
what benefit they would bring.

Does anyone have a reference to a good outline of what Traits do for  
Smalltalk?  Do they provide the ability to hide instance variables  
from subclasses -- or eliminate the need for recompiling subclasses?   
Do they simply add a new feature, or do they replace something in (or  
even all of) classes or metaclasses?

					Greg A. Woods; Planix, Inc.
					<woods at planix.ca>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081126/d1106b6f/PGP.pgp

More information about the Squeak-dev mailing list