Is it safe for me to wait until 3.0 before learning what the "new coercion model" actually is, or should I do that now if I want any new functionality to be merged into 3.0?
John On 01/04/2008, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > > On Apr 1, 2008, at 6:15 AM, David Harvey wrote: > > > On Apr 1, 2008, at 4:53 AM, mabshoff wrote: > > > >> On Apr 1, 10:41 am, shreevatsa <[EMAIL PROTECTED]> wrote: > >>> Someone else was trying to do something, and I tried something and > >>> got > >>> a crash; mabshoff asked me to post a backtrace. (So if it is very > >>> long, don't blame me ;-)) > >>> > >>> This is probably invalid mathematics that should raise an exception, > >>> but it causes a crash instead on my OS X 10.4. The other person also > >>> had this problem on Linux. mabshoff speculated it is a 32-bit/64-bit > >>> issue, since it raises an exception for him. > >>> > >>> Code: > >>> K.<x>=QQ['X']; p=EuclideanDomainElement(K); > >>> q=EuclideanDomainElement(K); (x^3+p*x+q).quo_rem(3*x^2+p) > > > > Wait a second.... > > > > if I type > > > > sage: K.<x> = QQ['X'] > > sage: p = EuclideanDomainElement(K) > > > > what is this supposed to even mean? What is p supposed to be here? > > I get > > > > sage: p > > Generic element of a structure > > > > I think the __init__ call gets redirected to Element.__init__, which > > just sets the parent. In my opinion, this constructor call should be > > disallowed somehow. Unless there's something about the new coercion > > model that I don't know. > > > Yeah, this is totally nonsensical--no idea what it's trying to do > here, but as a general principle we shouldn't crash on nonsense. > > In the new coercion model all the empty classes like > EuclideanDomainElement will go away (why is this in the global > namespace) because categories will play a much larger role (and not > be determined by inheritance). This is where abstract classes are good. > > > - Robert > > > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---