> You return false if type has no equality -- this has good chance > being wrong.
I don't think so. If Any is declared to be of type SetCategory, then = should never give an error. And if the specification of =$Any is such that it says: Comparing elements in Any that originate from a domain that does not have an equality yields false. > Signaling error is probably the best. I thought > that without check comparison may crash, so I considered adding > explicit call to error. However, after looking at generated > code I see that there is check before call, so no need to code > extra check. In any way, even if the compiler silently produces such a check. I would like to see it explicitly in the code. > Two more remarks: > 1) You need to declare Dx as type, otherwise compile will fail > (even in r624). > 2) Actually, other problem I mentioned is more serious: EVAL > does not work for domains with nontrivial non-type parameters, > like SAE(FRAC INT, UP(x, FRAC INT), x^2-3). One then needs > to replace EVAL by more complicated function, something like > > evalType(t) == > op := opOf t > args := rest t > cs := rest GETDATABASE(op, 'COSIG) > nargs := [if c then a else ["QUOTE", a] for a in args for c in cs] > EVAL([op, :nargs]) I give up and rather opt for removing the Any and None types. I can accept something like Object(C: Category), but Any is simply too typeless for my taste. Ralf --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en -~----------~----~----~----~------~----~------~--~---
