Status: Accepted
Owner: marianopeck
CC:
[hidden email]
Labels: Type-Enh
New issue 6038 by marianopeck: ProtoObject should NOT implement #rehash
http://code.google.com/p/pharo/issues/detail?id=6038That is a hack, as its comment says:
ProtoObject >> rehash
"Do nothing. Here so sending this to a Set does not have to do a time
consuming respondsTo:"
Well, a couple of things:
1) now we have HashedCollection superclass, so all we need to do is
#isKindOf: HashedColletion
2) the ONLY place I found that sends #rehash to something that is NOT a
HashedCollection is Object >> veryDeepCopyWith:.
So since considering that the isKindOf: is not *that* costly, and that we
only use veryDeepCopy in a very few places, I recommend removing
ProtoObject >> rehash and add the isKinfOf: to #veryDeepCopyWith:
Slice is coming in case you agree
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker