[Maxima] Sanitize is not fool proof (yet) .Sanitize2 seems to work as advertized.
raymond.toy at ericsson.com
Tue Jan 2 10:04:44 CST 2007
>>>>> "Robert" == Robert Dodier <robert.dodier at gmail.com> writes:
Robert> On 1/2/07, Michel Van den Bergh <michel.vandenbergh at uhasselt.be> wrote:
>> > Are you aware that of the syntax f('x):=... creates a function which
>> > does not evaluate x when called?
Robert> Hmm, that's interesting. I don't remember seeing that one before.
Robert> Looks like the documentation for := can be beefed up; I'll work on it.
>> Now I ***know*** one can rewrite this example so that it works (e.g.
>> Richard has given a fairly generic way using ?gensym()).
>> But this is not my point. The ***user should not have to worry about
>> this***. After all this is a ***completely trivial one line program***.
>> It should work as expected.
Robert> I think we all agree that lexical scope is generally better than dynamic.
Indeed. But what do we really want? In lisp, (defun foo (x)
<stuff>) where x is a special variable will bind x to the arg's value
in the body of the function foo. I think this is useful, but usually
it's not what we want and because Common Lisp generally uses *x* to
denote special variables. (I'm pretty sure there are parts of maxima
that actually depend on this rebinding of args.)
What is maxima supposed to do? What if the user really wants this
binding to happen? How do we make it not happen?
I certainly would like to see lexical scope, but I don't really know
how to make that happen.
More information about the Maxima