[Pharo-dev] method vs. selector consistency?

Esteban Lorenzano estebanlm at gmail.com
Thu Aug 29 08:15:23 EDT 2013


they are "protocols" 
method category is the old non-accurate name :)

Esteban

On Aug 29, 2013, at 1:44 PM, btc at openInWorld.com wrote:

> Stéphane Ducasse wrote:
>> methodsInCategory: aName 	"Answer a list of the methods of the receiver that are in category named aName"
>> 	
>> 	| aColl |
>> 	aColl := Set withAll: (self organization listAtCategoryNamed: aName).
>> 	^ aColl asArray sort
>> 
>> 
>> allMethodsInCategory: aName 	"Answer a list of all the methods of the receiver and all its 	superclasses that are in the category named aName"
>> 	
>> 	| aColl |
>> 	aColl := OrderedCollection new.
>> 	self withAllSuperclasses do: [:aClass | 		aColl addAll: (aClass organization listAtCategoryNamed: aName) ].
>> 	^ aColl asSet asArray sort
>> 
>> 
>> uncategorizedMethods
>> 	^ self methodsInCategory: Protocol unclassified
>> 
>> all these methods returns selectors and not compiled methods.
>> 
>> So I would like to rename them accordingly.
>> What do you think?
>> 
>> Stef
>> 
>>  
> When writing about Smalltalk, I am often confused about whether I should call them Method Categories or Protocols ?
> I actually prefer the latter, partly because it reads better in prose not having to write Class Categories and Method Categories every time, and just Categories and Protocols.
> Are the terms interchangeable? What is the official stance?
> 
> cheers -ben
> 
> 





More information about the Pharo-dev mailing list