On Fri, Mar 13, 2009 at 7:06 PM, Ralf Hemmecke <r...@hemmecke.de> wrote:
>
>>> 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.

This is ridiculous.  If we made a==b true only if parent(a) ==
parent(b), we would get nonstop complaints and confusion from users,
and would be doing something different and massively more *pedantic*
than every other math software system I have ever used.

 -- William

> 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
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to