[squeak-dev] Re: Instance variable access in superclasses.
David Mitchell
david.mitchell at gmail.com
Wed Nov 26 20:57:23 UTC 2008
www.iam.unibe.ch/~scg/Research/Traits
See also prior discussions on traits on this list:
http://www.google.com/search?&q=site%3Ahttp%3A%2F%2Flists.squeakfoundation.org%2Fpipermail%2Fsqueak-dev%2F+traits
On Wed, Nov 26, 2008 at 2:32 PM, Greg A. Woods; Planix, Inc.
<woods at planix.ca> wrote:
>
> 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>
>
>
>
>
>
More information about the Squeak-dev
mailing list
|