[Pharo-dev] Convention for "reset" methods
btc at openinworld.com
Sun Nov 12 08:30:40 EST 2017
+1. I think "accessing" sometimes ends up the default catch-all.
"Initialization" makes more sense for this.
On Sun, Nov 12, 2017 at 2:31 AM, Cyril Ferlicot <cyril.ferlicot at gmail.com>
> 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
> 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
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev