[Pharo-dev] Convention for "reset" methods

Ben Coman 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.

Cheers -ben

On Sun, Nov 12, 2017 at 2:31 AM, Cyril Ferlicot <cyril.ferlicot at gmail.com>
wrote:

> 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.fr
>
> http://www.synectique.eu
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171112/ae43947f/attachment-0002.html>


More information about the Pharo-dev mailing list