Hi Dave --

I'll go back to lurking mode now :-)

No worries =) Feel free to un-lurk any time ;-)

Best,
Marcel

Am 16.06.2023 15:32:43 schrieb David T. Lewis <lewis@mail.msen.com>:

Patrick,

Thank you for the clarification, and apologies to Christoph for my misunderstanding.

I'll go back to lurking mode now :-)

Dave


On Fri, Jun 16, 2023 at 05:00:35AM +0000, Rein, Patrick via Squeak-dev wrote:
> Sorry for adding to the discussion after your summary Dave, but I am also in favor of moving it up and I disagree that there is no use case. Just imagine the following:
>
> You have some code collecting stuff in an OrderedCollection. The collection is used to generate a list of filter items, which only uses the unique items, so you used #withoutDuplicates. Now, you have to optimize it and realize you only care for the counts and thus use a Bag (not unusual in my experience)...
>
> Same as with the ExceptionSet discussion, I am in favor for this change (in general, no opinion on the specifics) due to my experience with tutoring several hundred university students starting with Squeak. These situations are what gets them frustrated (yes, they get frustrated easily, but some things are more justified than others). Protocols that are inconsistent across classes for no special reason and thus require them to learn special ways of doing things. Christoph's struggle in arguing for why there are different ways to deduplicate a collection in Squeak by Example also hints at that usability problem. :)
>
> Cheers,
> Patrick
> ________________________________________
> From: David T. Lewis
> Sent: Thursday, June 15, 2023 11:44:32 PM
> To: The general-purpose Squeak developers list
> Subject: [squeak-dev] Re: #withoutDuplicates on Collection?
>
> On Thu, Jun 15, 2023 at 06:38:36PM +0000, Thiede, Christoph wrote:
> >
> > I think that this discussion is being overshadowed by another issue,
> > the iteration semantics of dictionaries. Because Dictionary>>#do: ignores
> > the keys, there is always a sharp break when applying iteration logic
> > from another collection to dictionaries. Thus, I think we should not
> > discuss Collection>>#withoutDuplicates through the example of dictionaries.
> > But given their existing iteration semantics, I'm with Vanessa on the
> > behavior of Dictionary>>#withoutDuplicates: Keys are only metadata not
> > relevant for iteration, so they should also not influence deduplication.
> >
>
> To summarize what I have read so far in this discussion:
>
> It sounds like a good idea, but
>
> 1) There is no known use case for it.
> 2) It does not solve any problems.
> 3) It leads to confusion.
>
> Dave
>
>