>>>>> "Stavros" == Stavros Macrakis <macrakis at gmail.com> writes:
>> I am starting to write routines in maxima for my research
>> (mainly in dynamical systems). So far these routines are very
>> simple and they have been written in the maxima language.
>>
>> I would like some opinions from others on the pros and cons of
>> writing routines for use in maxima directly in lisp vs. writing them
>> in maxima.
Stavros> Despite the various imperfections in the Maxima language (which I've
Stavros> talked about a lot in the past), I still think it is a much more
Stavros> suitable language for writing mathematical routines, if only for the
Stavros> fact that you can use nice infix notation.
Stavros> There are, though a few cases where I'd consider using Lisp instead:
Stavros> 1) If you are a hardened Lisp hacker who is very comfortable in the
Stavros> Lisp world, go with Lisp. But keep in mind that if you interface with
Stavros> Maxima internals, they are written in rather archaic style, with no
Stavros> object orientation, lots of global variables, lots of side effects,
Stavros> poor documentation, etc.
Stavros> 2) If you need to write complicated algorithms where you use special
Stavros> data structures, you should probably use Lisp. For example, if you
Stavros> want to work algorithmically with graphs and the like, you should
Stavros> probably use Lisp.
Stavros> 3) If you want to write simplification routines beyond the fairly
Stavros> simple ones you can write using the pattern-matching facility, you
Stavros> should probably use Lisp.
Stavros> I'd be interested to hear others' thoughts.
I think this is a very nice summary. The only other thing I might add
would be if speed were really important, it might be beneficial to
write at least some of the core functions in Lisp. This probably only
matters if you're crunching numbers, in which case you should be using
a Lisp that does a good job with that.
I know Lisp far better than maxima, but I think I'd try to do as much
as possible in maxima anyway.
Ray