Classes as Packages (was: Harvesting infrastructure)
tblanchard at mac.com
tblanchard at mac.com
Mon Nov 18 09:26:45 UTC 2002
On Sunday, November 17, 2002, at 09:01 PM, Anthony Hannan wrote:
>> Anthony Hannan <ajh18 at cornell.edu> wrote:
>>> What about classes as packages as per my recent email entitled "Class
>>> Dependencies". I really think we should consider this.
>
>
My visceral reaction to this is ICK!
I think inheritance is way overworked as a composition mechanism.
There are other more interesting techniques that have been
underutilized including delegation and forwarding and method
categories. I do more ObjectiveC than ST and ObjC has method
categories - loadable groups of methods that you can add to a class
anytime you like without recompiling. This lets you add behavior to a
class without really changing its type. (Inheritance generally
indicates type - which is different from protocol).
Your MI approach sounds something like categories - but adds fuzzy
typing ideas too I think.
Maybe I don't entirely understand your proposal - but suppose a package
requires the addition of a bit of behavior to Object - will Object now
derive from something else too?
Todd Blanchard
More information about the Squeak-dev
mailing list
|