Ralf Hemmecke wrote:
>
> >>> 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.
> >
> > I do not think so -- in general operations are partial functions.
> > Field exports / with signature '(%, %) -> %'. Do you expect
> > no error when computing 1/0?
>
> I could live with a catchable exception. And of course that must be
> properly documented. But there should be no error.
>
Errors in Spad are catchable. ATM catching them is rather
inconvenient, but can be done.
> In fact, the signature (%,%)->% is wrong. It's only a compromise to
>
> /: (%, NonZero(%))->%
>
Similarly the signature (%,%)-> Boolean is a "compromise" for
(AnyWithEquality, AnyWithEquality) -> Boolean. But I feel that
this is necessary compromise: otherwise either writing code or
typechecking in the compier would get unmanagable.
--
Waldek Hebisch
[email protected]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---