Maxima and Lisp



> Currently I am porting code from maple to maxima.  This code makes heavy
> use of sets and lists.  Currently the current implementation of sets
> uses maxima lists.  If I take advantage of this, ie using listp instead
> of setp, or use [] instead of setify([]), then if the implementation
> of sets changes, my code breaks.  Furthermore if a faster implementation
> is built, I dont have to change my code.

This is a good point. So if I write stuff in lisp, it should be self
contained and the transition from maxima to lisp should be very well
defined. In fact, I tried by abstracting this transition into mlist2list
and list2mlist. I actually wondered, wether there weren't such functions
in maxima already. But OK, this can be a big problem.

> There are many places where
> I use functions that have direct analogs in lisp, such as cons, endcons,
> member, etc.  Dr. Willis has also written several functions for my porting
> effort in lisp, such as polynomialp, which is tied to the internal
> maxima representation.   However, I for one, find the maxima code
> you wrote easier to understand than the lisp code, as the lisp code
> is tied to the internal representation of maxima objects.  Also,
> it is tied to internal maxima functions, which may prevent moving your
> code to future versions of maxima if they ever change.

Don't you think it would be worthwhile to design a proper
transition-package, I.e. a collection of functions that translate between
maxima representation and lisp representation?

Martin