first class method categories (was Re: WTF is a trait?)
Blake
blake at kingdomrpg.com
Sat Sep 3 22:19:57 UTC 2005
On Sat, 03 Sep 2005 14:53:08 -0700, Avi Bryant <avi.bryant at gmail.com>
wrote:
>> A trait is not a run-time entity, just a first class method category.
>
> As I was saying to Daniel a few days ago, I'd love to see tools that
> really emphasized this view of traits. I want creating a trait to feel
> almost exactly like creating a method category: you should just be able
> to choose "new trait" from the method category column of a browser, give
> it a name, and see it show up there with the other categories. Until
> you add the same trait to some other class, it should be exactly as if
> it was just a category, just with different naming conventions. I
> should be able to drag a category/trait from the method category column
> of one class to another, to share the trait. The extra pieces of
> metadata for a particular application of a trait - aliases, removals -
> can appear in the text pane of the browser when I select that trait in
> the category column, and be editable there, rather than being shoved
> into the class definition. I think this would be a much lower-impact,
> more familiar way of integrating traits into the traditional Smalltalk
> mindset and workflow than treating them as part of the inheritance
> hierarchy, as they are now.
Ooh. That's a damn cool idea.
Would that mean that Smalltalk categories would have (or reflect, rather)
semantic value?
More information about the Squeak-dev
mailing list
|