Subject: how to pass the name of a variable as argument?
From: Richard Putman
Date: Tue, 6 May 2008 11:07:03 +0100
2008/5/4 Robert Dodier <robert.dodier at gmail.com>:
>
> ...
> I am mostly imagining a language which is happy with symbols and
> partially-evaluated expressions. (I realize that excludes Python in
> its current incarnation. Dunno how much work it would be to change it.)
>
> As a stop-gap measure, one could devise classes Symbol and
> Expression, say, and then explicitly create these, e.g.
> x = Symbol ('x')
> expr = Expression (x + 1)
> but that's clumsy. Symbol and Expression might exist anyway
> but it shouldn't be necessary for the user to explicitly create them.
> ...
sympy looks like that see http://wiki.sympy.org/wiki/Pretty_Printing
It didn't feel too clumsy when I played with it for a limited time anyway.
I am surprised how hairy some of maxima's sourcecode is being as how
Common Lisp is so well suited to symbolic manipulation.
Richard