first class method categories (was Re: WTF is a trait?)

stéphane ducasse ducasse at iam.unibe.ch
Sun Sep 4 07:16:17 UTC 2005


I like the idea....
Daniel :)?

Stef

PS: I'm finishing up my lectures (hope to have more time this week)...


>
>>
>> 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.
>
> Avi
>
>
>




More information about the Squeak-dev mailing list