first class method categories (was Re: WTF is a trait?)
Daniel Vainsencher
daniel.vainsencher at gmail.com
Sun Sep 4 04:59:55 UTC 2005
Classes can do that right now, just implement the method in the class,
and it overrides any versions provided by traits.
This would be a small change in behavior between method
categories/private traits, and shared traits - redefining a method from
a category changes it. So I'm assuming that's also what we want for a
traits while its private, but that would change when it becomes shared.
I'm not sure that's such a big deal, but its a sort of inconsistency
worth noticing.
Daniel
Alan Lovejoy wrote:
> Classes would also need to be able to override the method implementation
> defined by an imported Trait, without affecting the "global" version of the
> method as defined by the Trait.
>
> --Alan
>
>
>
>
More information about the Squeak-dev
mailing list
|