[squeak-dev] WeakArray species (was The Trunk: Collections-bf.612.mcz)

Chris Muller asqueaker at gmail.com
Wed Apr 8 16:03:27 UTC 2015


The impetus for the change was so that (WeakArray new = Array new)
would return true instead of false.  But we could accomplish that by
overriding #= instead of #species, I think..

Do you think overriding #species in WeakArray at this point in the
release process is too aggressive?

On Wed, Apr 8, 2015 at 6:16 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 08.04.2015, at 04:45, Chris Muller <asqueaker at gmail.com> wrote:
>>
>> The change to override #species may not have gotten enough scrutiny.
>> It was a mere mention by Eliot in a prior thread, which I captured
>> into Collections-cmm.603.  It may be worth some additional peer
>> scrutiny.  It feels right on the surface but could such a change cause
>> negative impacts elsewhere?
>
> Oh, that was a recent change? I wondered why we never noticed the problems before. That explains it.
>
> - Bert -
>
>>
>>
>> On Tue, Apr 7, 2015 at 7:04 AM,  <commits at source.squeak.org> wrote:
>>> Tobias Pape uploaded a new version of Collections to project The Trunk:
>>> http://source.squeak.org/trunk/Collections-bf.612.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Collections-bf.612
>>> Author: bf
>>> Time: 7 April 2015, 2:04:06.99 pm
>>> UUID: 1b9e2fc6-03fb-41c2-a3e8-197fa24c108a
>>> Ancestors: Collections-ul.611
>>>
>>> Ensure that copyWith/out retains the weak-ness of a weak array.
>>>
>>> =============== Diff against Collections-ul.611 ===============
>>>
>>> Item was added:
>>> + ----- Method: WeakArray>>copyWith: (in category 'copying') -----
>>> + copyWith: newElement
>>> +       "Re-implemented to not return a strong copy."
>>> +       ^ (super copyWith: newElement) as: self class!
>>>
>>> Item was added:
>>> + ----- Method: WeakArray>>copyWithout: (in category 'copying') -----
>>> + copyWithout: oldElement
>>> +       "Re-implemented to not return a strong copy."
>>> +       ^ (super copyWithout: oldElement) as: self class!
>>>
>>> Item was changed:
>>> + ----- Method: WeakArray>>species (in category 'private') -----
>>> - ----- Method: WeakArray>>species (in category 'as yet unclassified') -----
>>>  species
>>>        "More useful to have strongly-referenced results of #select: and #collect:."
>>>        ^ Array!
>>>
>>>
>>
>
>
>
>
>


More information about the Squeak-dev mailing list