> Hello Michel,
>> Are you aware that of the syntax f('x):=... creates a function which
>> does not evaluate x when called?
>> You may find that useful. Did you download the comercial macsyma demo
>> from Dr. Fateman's web site?
>> It contains the reference manual for the Macsyma language, which I
>> think you would find helpful.
>> Dan Stanger
> No, but I did know about f(x)::= which is the same I presume. Anyway
> this is irrelevant for the example:
> h('s,t):=s[t]$
> h(r,1);
> r_1
> h(t,1);
> t evaluates to 1
> Improper name or value in functional position.
> #0: h(s=t,t=1)
> -- an error. To debug this try debugmode(true);
>
> 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.
>
> Michel
>
Followup: I think many new comers to maxima who try to write their first
trivial program and are confronted with issues like this will declare
maxima to be "buggy as hell" and return to the safe haven of Maple or
Mathematica.
If one can say to such users: please use sanitize(h), or
h(s:lexical,t:lexical) or something similar then perhaps we can keep
them. However technical explanations about lexical versus dynamical
scoping (yes I understand what this means) or the advice to use lisp
won't do the job.
Sorry if this sounds a little bitter.
Michel