I am having trouble getting isequal to work for a user created struct. Below is an example that shows what I’m doing. I don’t understand what I’m doing wrong.
I don’t know about the rationales, but the documentation states, that isequal contains special handling for floating points (NaN for example) and isless seems to be meant mainly for implementing total orders on non numeric types.
# core numeric operations & types
==(x, y) = x === y
at share/julia/base/Base.jl
and
isequal(x, y) = x == y
< on the other side falls back to isless:
<(x, y) = isless(x, y)
while there is no generic isless.
I don’t know if the fallback ==(x,y) = x === y could be made type-specific to and make == fallback to isequal by default. Maybe? (that would be breaking, though). But there might be a deeper reason for that difference.