[squeak-dev] Bag>>#rehash missing

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat Mar 6 22:23:30 UTC 2021


Hi all,
I understand that we can have bags broken by mutation of some
elements, and that rehash could be convenient while debugging.
But on the other hand, I see quite few senders of rehash in the image,
so I just wonder, are we gonna need it?

I think that private not only covers methods that are really private
and should not be sent by objects of other classes, it also often
means not to be sent in normal circumstances, maybe something closer
to privileged?

Le sam. 6 mars 2021 à 11:48, Marcel Taeumel <marcel.taeumel at hpi.de> a écrit :
>
> Hi Patrick.
>
> +1 on adding #rehash for Bag ... although it technically depends on #contentsClass ? Hmmm...
>
> +0.5 on making #rehash non-private. Hmm.... maybe "initialization" would be a fitting category. Well, definitely not "update" or something like that. Clients should normally not call it, right?
>
> Best,
> Marcel
>
> Am 05.03.2021 20:12:19 schrieb Rein, Patrick <patrick.rein at hpi.de>:
>
> Hi everyone,
>
> during a recent debugging session I noticed that Bag does not implement #rehash although it is, in essence, a hash-based collection and should therefore probably roughly adhere to the protocol of HashedCollection. Is there a good reason not to have #rehash on Bag?
>
> On a similar note: HashedCollection>>#rehash is in the `private` protocol but has various senders. As even the class comment mentions the usage of #rehash, I would also propose to move it out of the `private` protocol. :)
>
> Best wishes,
> Patrick
>
>


More information about the Squeak-dev mailing list