Hi,
Torsten is doing a really cool job by cleaning the protocols of Pharo.
Smalltalk has a lot of conventions and if we want the users to apply
them we need to have a clean Pharo.
On that subject I was wondering…
Do we have a real convention for "reset" methods?
With this script:
((RPackageOrganizer default packages flatCollect: #methods) select: [
:each | each selector = #reset ]) collect: #protocol as: Bag
We can see that there is different way to do.
25 in accessing
11 in initialization
10 in positioning
10 in instance creation
And some others less popular choices.
So my question is, should we have a conventional protocol for reset methods?
For now, most of them are in "accessing", but it cause a violation of
the RBUnaryAccessingMethodWithoutReturnRule.
Personally I think that "initialization" protocol make the more sens.
If the community agree on it we could
- Recategorize
- Make sure the automatic categorizer follow the convention
- Add a rule/test to check that
Waiting for your thoughts :)
--
Cyril Ferlicot
https://ferlicot.frhttp://www.synectique.eu2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France