-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent behavior around tolerances in isequal
and isless
#311
Comments
For 4.0 or a future version? |
Removing the tolerances would be a breaking change, so I think this is for 4.0. (Or, remove the tolerances on v5 release?) |
Cool. I want to release v4.0 on Monday (choosing a day at random 😂), so I’m happy to merge PRs if the tests pass. Otherwise issues can be addressed for the following release cycle. |
Thank you for notifying the release schedule! |
Well it's not so much a schedule :) - but it's probably a good idea to make a release fairly soon. |
Examples of inconsistent behaviors
I am trying to remove method
isless(::Point, ::Point)
as discussed in #300 (comment), and I found some inconsistent behavior inisequal
andisless
.Proposal on removing the tolerances
I think removing these tolerances would be better for the following points.
Specialized
unique
method can be removed.This is related to the following TODO comment.
Luxor.jl/src/point.jl
Lines 160 to 172 in 6c271e9
Base.hash
will be consistent.The
Base.hash
should be consistent withBase.isequal
. Currently,isequal(x::Point, y::Point)
does not implyhash(x)==hash(y)
.https://github.com/JuliaLang/julia/blob/396abe4fdc8615e162462910bfc16729be7c95ed/base/hashing.jl#L5-L9
The text was updated successfully, but these errors were encountered: