[Seaside-dev] Grease-Core-lr.48

Lukas Renggli renggli at gmail.com
Fri Sep 10 11:07:57 UTC 2010


> I'm not happy at all with the #hash changes. It's a really bad
> implementation of #hash, only slightly better than:
>
> #hash
>   ^ 42

The problem with the old implementation was that it was incorrect, as
its method comment stated itself. Dictionaries that were equal did not
necessary have the same hash.

> I'm also not happy with the #= changes. Does #isDictionary cause
> problems on any dialect? The change introduces commutativity problems:
>
> Dictionary new = GRSmallDictionary new -> true
> GRSmallDictionary new = Dictionary new -> false

Pharo and Squeak are likely the only Smalltalk that have #isDictionary.

Actually #species would be the thing to use to avoid such problems,
but Pharo doesn't do that.

Where is this functionality used? This is fixable, but is it really
worth the trouble?

Lukas

-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside-dev mailing list