eval=evil? was remvalue



Robert Dodier wrote:
> On 1/1/07, Michel Van den Bergh <michel.vandenbergh at uhasselt.be> wrote:
>
>> My point is that the ***names*** of parameters and local variables in
>> the ***definitiion*** of a function
>> are syntactic entities (dummy variables in a sense). Their names should
>> be irrelevant. In maxima the behaviour of
>> a function depends on these names. It seems to me that this is very bad
>> and can lead to all kinds of subtle bugs.
>
> Agreed, name collisions should be harmless. The problem you have
> encountered is an effect of dynamic binding. In this sense, Maxima
> is "broken as designed". People have often raised the possibility of
> reworking the Maxima language so that it has lexical scope instead.
> I mention this not to discourage you, but rather just to note that the
> more often this topic is discussed, the more likely it is that someone
> will come up with a solution.
>
> As a stop-gap measure, maybe we can come up with a declaration
> which tells Maxima to carry out gensym substitution on function
> arguments. e.g. F(x, y) := (declare([x, y], lexical), blah blah blah ...)
> I haven't thought this through; it is just an idea.
>
> All the best,
> Robert Dodier
Yes something like that. And not even as a stop gap measure. This seems
like the ideal solution to me
since it is backwards compatible. A similar declaration should be
available for the arguments to the "block"
statement ("local variables").

Richard has posted a "sanitize" program. I have not studied it yet in
detail but it might already do more of
less what one wants.

Michel