On Dec 29, 2008, at 12:23 PM, Alexandre Bergel wrote:

> Dear List,
>
> I was wondering whether I am the only one shocked when I see this:
>
>       (Set new add: #b -> 'B'; yourself) includes: #b -> 'B' ====> true
>       (Set new add: #b -> 'B'; yourself) includes: 'B'  ====> false

this is correct

>       (Dictionary new add: #b -> 'B'; yourself) includes: #b -> 'B'  
> ====>  false
>       (Dictionary new add: #b -> 'B'; yourself) includes: 'B'  ====> true

we should check the semantics of includes:

> Dictionary inherits from Set. This means that if Set would have a
> contract, it would break in Dictionary.
> IMO,  we should have
>       (Dictionary new add: #b -> 'B'; yourself) includes: #b -> 'B' ====>
> true
>       (Dictionary new add: #b -> 'B'; yourself) includes: 'B'  ====> false
>
> No?

Dictionary and Set relationship is subclassing so a lot can be strange.
We should fix that in Bloc.

>
>
> Alexandre
>
> -- 
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to