>> Of course, then QQ(1)==ZZ(1) would return false. But I really don't >> see a problem with that.
> I would find that super inconvenient. Well, maybe later you'll appreciate my suggestion a bit more. > How about "parent(a) == parent(b) and a == b" (of course "a==b" also must have "parent(a)==parent(b)" inside, because that is the condition that decides whether a coercion lookup should start or whether the == just works inside the parent. So "parent(a)==parent(b)" has to be evaluated twice. >> Note that it might even be a speed consideration. Always looking up >> coercions (even if they are cached) is not a good strategy. And the >> current '==' not being transitive might also hide bugs that are really >> hard to detect. > People have yet to show an example where this really hides any bugs. Good luck for the bug search whenever this will happen. Actually, programmers need just be a bit careless. They have tested a==b and b==c and then use c where they should have used a. If the code is complex enough, you can even read the code and don't spot the error. We all are so used to the fact that something that looks like == behaves like an equivalence relation. Ralf --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---