On 1/20/07, Michel Van den Bergh <michel.vandenbergh at uhasselt.be> wrote:
> How strongly do people actually feel about the translator to lisp
> in maxima?
>
> Having two totally different code bases which are supposed to have
> identical behavior seems like a maintenance nightmare. It might well
> impede progress.
My guess is that the most common use of the translator and compiler is
to speed up numeric calculations where the formulas have been derived
using Maxima's symbolic facilities. It would be completely
unacceptable in this case to require that users rewrite their code in
Lisp. They could, I suppose, use the Fortran subsystem, which is in
effect a tiny subset of the translator where the target language is
Fortran rather than Lisp. But then they'd still have to deal with the
systems issues of compiling the Fortran and linking it back into
Maxima, which is painful and not standardized across Lisp
implementations.
Having written the first version of the translator in the early 70's
(I was either in high school or a freshman), I can tell you that a
basic translator is not that complicated. The current translator
(which contains none of my code as far as I know) is much more
elaborate partly because it is better, but also because it is
over-engineered, and handles many more special cases.
Having an interpreter and a compatible compiler is standard practice
in the Lisp world, and I see no reason that we can't do a good job in
Maxima without inordinate effort. There are certain constructions
which are very difficult to compile effectively, but that's not fatal,
because the interpreter is always available as backup. And perhaps
some of the messier semantics need to be reevaluated -- for example
dynamic vs. static scope. In fact, all functions which try to be
clever about evaluating their arguments in special contexts (e.g. cf,
ev) are rather a mess.
It seems important to me that users need learn only one new language
to take advantage of Maxima and anyway, few users nowadays know Lisp
or are willing to invest in it. Not to mention that the Lisp style
used in Maxima internals is rather... um... dated... and um... hard to
read. In fact, I would go in the opposite direction, and try to make
it easier for users writing in the Maxima language to do more, notably
to write simplifiers for mathematical functions.
-s