[squeak-dev] Re: intersection: method for dictionaries flaky

Paolo Bonzini bonzini at gnu.org
Tue Jul 28 05:50:06 UTC 2009


>> I propose that the intersection of two Dictionaries should either
>>     a)  Return the intersection of the keys of the Dictionaries.
>>          Not an intuitive answer either but better than now.
>>          For example, what would you expect the intersection of two
>> MethodDictionaries
>>          to be?

I second this.  It is extremely unlikely that someone is using to 
intersect values, since the unique values of a Dictionary (the 
"Set"-like values) are actually the keys.

>>     b)  Generate the shouldNotImplement error.
>>
>
> c) make Dictionary be not the subclass of Set, then questions, like
> wrong #intersection: symmetry will auto-become a non-issue. :)

Paolo




More information about the Squeak-dev mailing list