Hi
I'm not happy at all with the #hash changes. It's a really bad implementation of #hash, only slightly better than: #hash ^ 42 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 If this is really the definition of #= we want we should kick #isDictionary from GRSmallDictionary. Cheers Philippe _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
> 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 _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
2010/9/10 Lukas Renggli <[hidden email]>:
>> 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. Then we should probably move it to Grease-Pharo-Core or kick it. > 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? #= is quite helpful for unit tests, but yes, given the option that we can only do it wrong, we should probably kick them both and work around it in the unit tests. Cheers Philippe _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
In reply to this post by Lukas Renggli
Lukas -
VA Smalltalk also implements #isDictionary ...
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc. Skype: john_okeefe2 Mobile: +1 919 417-3181 (Business hours USA Eastern Time zone (GMT -5)) [hidden email] http://st.instantiations.com VA Smalltalk...Onward and Upward! On Fri, Sep 10, 2010 at 7:07 AM, Lukas Renggli <[hidden email]> wrote:
Lukas _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Free forum by Nabble | Edit this page |