[squeak-dev] The Inbox: Collections-cmm.1022.mcz

Chris Muller asqueaker at gmail.com
Wed Nov 23 01:53:32 UTC 2022


Hi Eliot,

     why “add: subString copy” and not just “add: subString”? subString’s
> values are all instantiated locally to subStrings:, don’t escape other than
> through the result sequence, and are not duplicated.  The send of copy
> looks to me to have been a misunderstanding on behalf of a prior author.
>

I actually noticed and wondered about that, but didn't want to distract too
much from my main question in case there was some magical need for
it.  It's so peculiar it was proposed to survive its third developer
initials, ha ha.  :)

Looks like we have a minor optimization opportunity there the next time
someone swings around to subStrings:.


> I’d also love to see the argument be able to be either a string or a
> character, with two separate loops in ifTrue:ifFalse: gif efficiency,
> avoiding instantiating a singleton collection if the arg is a character.


+1.

 - Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20221122/fc83d6fe/attachment.html>


More information about the Squeak-dev mailing list