[squeak-dev] The Inbox: Collections-ct.827.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jun 3 06:22:00 UTC 2019


Hi, there.

I think that, in this case, " someCollection asArray joinSeparatedBy: '-' " would produce more readable code. Even better, sort the collection explicitely: " someCollection sorted: [:a :b | ...]) joinSeparatedBy: '-' ".

-1 (for moving #joinSeparatedBy: into Collection)

Also, I think we should deprecate #asStringByDelimiter: and friends. Looking at the sends, there is not much to do in Trunk.

Best,
Marcel
Am 03.06.2019 07:32:15 schrieb Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
I agree with Tobias and Subbu, random order makes the feature questionable. Please try to write a TestCase to illustrate the expectations in case of non sequenceable collections.

Le dim. 2 juin 2019 à 07:58, K K Subbu <kksubbu.ml at gmail.com [mailto:kksubbu.ml at gmail.com]> a écrit :

On 02/06/19 12:25 AM, Chris Muller wrote:
> The method only uses #do:, which is required of all Collections, so
> it's not any less clear than #do: on those objects.

Chris,

#do: does yield a sequence but the order is not guaranteed to be same
from one send to another.

The provided test case for #joinSeparatedBy: assumed a particular
sequence. When Christoph proposed to relax it for all Collections, the
existing test cases will also have to change to avoid false fails.

Regards .. Subbu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190603/02aa0a8f/attachment.html>


More information about the Squeak-dev mailing list