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

Marcel Taeumel marcel.taeumel at hpi.de
Tue Nov 16 11:04:54 UTC 2021


> That contents is a dict is implementation detail not to be leaked.

To be fair, there is an actual extension point in #contentsClass. Yet, it remains an implementation detail, hidden from clients. Clients should use #newFrom: or #withAll: to fill a bag with existing contents.

Best,
Marcel
Am 16.11.2021 11:58:09 schrieb Tobias Pape <das.linux at gmx.de>:
-1

this is to my eyes doubtlessly private :)
That contents is a dict is implementation detail not to be leaked.

Best regards
-Tobias

> On 16. Nov 2021, at 11:28, Marcel Taeumel wrote:
>
>> ==================== Summary ====================
>>
>> Name: Collections-ct.962
>> Author: ct
>> Time: 13 November 2021, 2:29:12.457577 am
>> UUID: 762c672f-abb5-194e-9f54-14cce19aa7f9
>> Ancestors: Collections-pre.961
>>
>> Adds convenience constructor to Bag.
>>
>> Bag newFromContents: (Dictionary new at: #mon put: 7; at: #tue put: 2; at: #wed put: 4; yourself).
>>
>> =============== Diff against Collections-pre.961 ===============
>>
>> Item was added:
>> + ----- Method: Bag class>>newFromContents: (in category 'instance creation') -----
>> + newFromContents: aDictionary
>> +
>> + ^ self new setContents: aDictionary!



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


More information about the Squeak-dev mailing list