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
On 29 August 2013 09:09, Stéphane Ducasse <stephane.ducasse@inria.fr> 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
yes, if they return selectors, the name should talk about selectors.. -- Best regards, Igor Stasenko.
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
they are "protocols" method category is the old non-accurate name :) Esteban On Aug 29, 2013, at 1:44 PM, btc@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
And now Package should be used instead Class category. Am I right? 2013/8/29 Esteban Lorenzano <estebanlm@gmail.com>
they are "protocols" method category is the old non-accurate name :)
Esteban
On Aug 29, 2013, at 1:44 PM, btc@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
On Aug 29, 2013, at 2:28 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
And now Package should be used instead Class category. Am I right?
Kind of. We would loveâ¦.
2013/8/29 Esteban Lorenzano <estebanlm@gmail.com> they are "protocols" method category is the old non-accurate name :)
Esteban
On Aug 29, 2013, at 1:44 PM, btc@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
On Aug 29, 2013, at 3:43 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
On Aug 29, 2013, at 2:28 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
And now Package should be used instead Class category. Am I right?
Kind of. We would loveâ¦.
and we will... but we are still in transition with this... probably for pharo3, but most sure for pharo4 :)
2013/8/29 Esteban Lorenzano <estebanlm@gmail.com> they are "protocols" method category is the old non-accurate name :)
Esteban
On Aug 29, 2013, at 1:44 PM, btc@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
Protocols we will rename every categories into protocols. then methods -> compiled Methods selectors -> symbol
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
participants (6)
-
btc@openinworld.com -
Denis Kudriashov -
Esteban A. Maringolo -
Esteban Lorenzano -
Igor Stasenko -
Stéphane Ducasse