<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        How would you compare (in-place) #sort: and #rehash considering their utility?<div><br></div><div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
                                        </div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 08.03.2021 11:42:35 schrieb Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">Le lun. 8 mars 2021 à 08:23, Marcel Taeumel <marcel.taeumel@hpi.de> a écrit :<br>><br>> Hi Nicolas.<br>><br>> > But on the other hand, I see quite few senders of rehash in the image,<br>> > so I just wonder, are we gonna need it?<br>><br>> Hmm... I don't think that looking for senders will reveal the actual need for #rehash. Maybe broken bags remain unnoticed? At least a test with proper commentary about this issue might help users to figure out when to use #rehash. In Trunk, there are only a few, short-living examples of bags, which do not suffer from this problem. :-)<br>><br>> In this particular case, some of our students stumbled upon this issue in a game and did not know how to interpret the effects to figure out what's going on. ... maybe we need some kind of hash-check test (tool) for the entire environment? The biggest issue here is to learn about the correct use of hashing.<br>><br>> Best,<br>> Marcel<br>><br><br>Sure, Bag problems have great chances to get unnoticed because Bags<br>are rarely used in practice.<br>However, it's not a problem of Bag per se, it's a problem of using<br>HashedCollection in general in case when we do not restrict object<br>mutations...<br>My sentiment was that rehash was more a utility method than something<br>needed with regard to standard usage of rehash currently in image.<br>But of course, if you think that it's a useful utility (pleonasm ?), just go.<br><br>> Am 06.03.2021 23:23:56 schrieb Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:<br>><br>> Hi all,<br>> I understand that we can have bags broken by mutation of some<br>> elements, and that rehash could be convenient while debugging.<br>> But on the other hand, I see quite few senders of rehash in the image,<br>> so I just wonder, are we gonna need it?<br>><br>> I think that private not only covers methods that are really private<br>> and should not be sent by objects of other classes, it also often<br>> means not to be sent in normal circumstances, maybe something closer<br>> to privileged?<br>><br>> Le sam. 6 mars 2021 à 11:48, Marcel Taeumel a écrit :<br>> ><br>> > Hi Patrick.<br>> ><br>> > +1 on adding #rehash for Bag ... although it technically depends on #contentsClass ? Hmmm...<br>> ><br>> > +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?<br>> ><br>> > Best,<br>> > Marcel<br>> ><br>> > Am 05.03.2021 20:12:19 schrieb Rein, Patrick :<br>> ><br>> > Hi everyone,<br>> ><br>> > 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?<br>> ><br>> > 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. :)<br>> ><br>> > Best wishes,<br>> > Patrick<br>> ><br>> ><br>><br>><br><br></nicolas.cellier.aka.nice@gmail.com></marcel.taeumel@hpi.de></div></blockquote></div>