The contract of ==
explicitly does not necessarily return a boolean and there is a separate function in Julia if you want to guarantee a boolean, and that’s isequal
.
It does this so that it integrates with the Julia ecosystem because it keeps the contracts of the language and uses isequal
s vs ==
appropriately. If it did not do this, then it would not work with general functions. This is how come tracing of numerical functions works.