Open oxinabox opened 3 years ago
There's definitely something weird going on here as hash
and isequal
aren't really the same at all here.
hash
is fine.
Recall that isequal(a,b)
implies hash(a) == hash(b)
, but that the reverse does not hold.
and that generally it is good to have hash depending on only a subset of the things that are required for equality, so that it is faster.
We changed hash to only depend on name
a while back for speed.
But the isequal
s and ==
seems odd.
Since normally those differ only in presence of NaN
or missing
Oh yes, I forgot about the adventure that was https://github.com/JuliaTime/TimeZones.jl/pull/281
It would be good to either delete
isequal
(so it falls back to==
) or add a comment to the code explaining the reason for the differencehttps://github.com/JuliaTime/TimeZones.jl/blob/906cea08c2ca4a5c76b12e14fb60d5df7990fbf7/src/types/variabletimezone.jl#L29-L39