[Maxima] how to pass the name of a variable as argument?
macrakis at alum.mit.edu
Wed May 14 08:39:59 CDT 2008
On Tue, May 13, 2008 at 3:34 PM, Robert Dodier <robert.dodier at gmail.com> wrote:
> On Tue, May 6, 2008 at 5:45 AM, Raymond Toy (RT/EUS) <raymond.toy at ericsson.com> wrote:
>> Why is implementing a different language helpful?
> Something to consider:
I like Python. It has many attractive properties, and it is certainly
being used more and more as a scripting language in which a variety of
mathematical tools are embedded. I'd certainly find it useful if
Maxima were able to "play well" with Python and other external
scripting tools. Frankly I'm surprised that no one yet has been able
to encapsulate Maxima's quirks (asking questions, printing out
unsolicited information, occasionally giving internal errors, etc.) in
such a way that scripting tools can use Maxima effectively. After
all, there are mechanisms (callbacks, error output streams,
exceptions) for handling all these things. I'm all for improving our
use of these things.
But there's a difference between making Maxima scriptable via Python
and changing the Maxima language itself to Python. Besides the messy
implementation issues (how do you make the Lisp garbage collector
interact cleanly with the Python garbage collector etc.), there's the
design issue. One of the appealing things about Maxima is the way it
blends mathematical and programming functionality. It does this by
"punning" between symbolic-variables and programming-variables,
between mathematical-functions and programming-routines (nouns/verbs),
and by making simplification ubiquitous.
I think it would be a fascinating design exercise to see if the
advantages of the Python language could be combined with the
advantages of the Maxima language. I know that Python is very
extensible, but I doubt that it is extensible enough to incorporate
Maxima's punning. Or if it is, I'd think that the overhead would be
unacceptable. But by all means circulate your design documents or
even a prototype implementation....
More information about the Maxima