On Fri, Sep 27, 2013 at 11:42 AM, John Lapeyre
<lapeyre.math122a at gmail.com>wrote:
> The main counterargument I can think of is: It would take a lot of
> these small changes before it could be very useful. And in the
> meantime, the complexity of the code is increased without benefit.
> It's a reasonable argument. If it were up to me, I'd put it in. But,
> I have no interest in persuading people to put it in the main branch.
>
I have two counterarguments:
* We shouldn't document Maxima as supporting Lisp rationals/complexes until
our support is believed to be comprehensive (modulo bugs); until we do
that, what value does partial support have?
* You should trap illegal cases whenever you see them to prevent users
from running into cases where we *silently* return incorrect answers.
Throwing errors isn't so bad -- at least the user knows that there is no
result. The case that worries me is actually returning an answer which is
incorrect.
I don't object to someone going through the code and making it Lisp
rational/complex clean. But I don't think it has all that much value. I'd
think it would be much more valuable to go through the whole codebase and
enable support for arbitrary numerical objects such as bfloats (which
aren't supported in CREs), intervals, etc. That does require a bit of
design work since not all objects support all operations (for example,
interval comparison doesn't support trichotomy). I don't think this is
that huge a task, but it does require careful attention to the logic (e.g.
a function assumes that an atom can't be complex because it is not $%i).
-s