[squeak-dev] #= ==> #hash issues
Bert Freudenberg
bert at freudenbergs.de
Fri Nov 16 00:38:16 UTC 2018
Somehow I missed Eliot's version, but unsurprisingly he had exactly the
same idea (use "last" not "stop" for hash). I'd still think bitXor: is
preferable to bitOr, that is the standard way in almost all hash methods.
But ...
BUT: I forgot about the super fallback in #=. That makes this discussion
pretty much moot, because since
#(1 2 3) = (1 to: 3) "true"
is true, this must also be true:
#(1 2 3) hash = (1 to: 3) hash "must be true"
So the only proper fix IMHO is to remove #hash from Interval (or replace it
with ^super hash and a proper comment)
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181115/8327ad35/attachment.html>
More information about the Squeak-dev
mailing list
|