[squeak-dev] The Inbox: Collections-mt.932.mcz
Tony Garnock-Jones
tonyg at leastfixedpoint.com
Fri Mar 26 19:01:04 UTC 2021
On 3/26/21 7:08 PM, Marcel Taeumel wrote:
> What do you think? Does it makes sense to pursue this idea of
> "dictionaries with collections as values" and enrich it with tests and
> documentation?
I frequently use dictionaries mapping keys to sets of values. I rely
often on these invariants:
- retrieval of a not-present key yields an empty collection
- removal of all the items from a given key's collection automatically
removes the key as well
I've never needed 'size' to yield anything other than the number of keys.
Christoph's concerns about interface/implementation explosion are
well-founded, though, I reckon; do... do we still have traits in Squeak?
Cheers,
Tony
More information about the Squeak-dev
mailing list
|