That's the road we took with Sage's matroids (see http://matroidunion.org/?p=517 ). But that's a very different beast from numbers. I wouldn't want to write
x.equals(y) every time instead of x == y. And it still doesn't solve the problem of x in S for a set S. --Stefan. On Tuesday, June 10, 2014 9:17:35 AM UTC-4, Marc Mezzarobba wrote: > > Nils Bruin wrote: > > The consistent solution, and one that is mathematically defendable, > > would be to have a != GF(p)(a) for integers a (i.e., always force > > explicit coercion for equality to hold). So that is making "==" strict > > enough to allow hash to meet its requirements, but this turns out to > > be too problematic for new users and for casual/interactive use [for > > more serious programming this is fine -- it's what Magma does and > > users there can live with it, after an adjustment period] > > This has probably been discussed about 1000 times before, but why not > introduce a separate equals() function to denote "mathematical" > equality, and keep = for "syntactic" equality(*)? I for one find the > behavior of = both pretty surprising and very inconvenient since my > first contact with sage. Besides, supporting both flavors of equality is > useful in any case. > > > (*) a = b if a naive deep comparison of a and b, possibly after > normalization, finds that they are identical > > -- > Marc > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.