proposal: subscripted local variables



 

> -----Original Message-----
> From: Robert Dodier [mailto:robert.dodier at gmail.com] 
.
> > is just a bad idea.
> 
> Oh. I guess we had better disallow stuff like diff(sin(x[1]), 
> x[1]) then.

I believe it was disallowed, originally.
To the extent that it can be misused, it represents a hazard.

Can we do diff (sin(x[1])+cos(x[2]),x[i]) or diff (sin(x[1])+cos(x[2]),x)
and get a vector?
Why not?  (And what if x, in this context, looks like [a,b,c,d])?

The notation for differentiation is fairly well known to be insufficient
because it generally lacks a notation for partial derivative with respect to
a position...

> 
> > Unnecessary and likely to lead to bugs.
> > What about f(x[1],x):= ...  ??
> 
> What about it? When we try to prevent stupidity, we are also
> preventing cleverness.

I think that programming notation should try to mimick good mathematical
notation, not ALL mathematical notation.  Some mathematical notation is
ambiguous, and sometimes it is just a bad idea: much work has been published
that consists solely of introducing bad notation for more-or-less obvious
concepts. I have criticized Mathematica for its potential for cryptic
programs and its runic notation. 

Even if a computer can be programmed to use such syntax and semantics, the
human reader of programs should be considered important. There are a number
of features of Maxima that I know about that I generally do not use because
it makes the program hard for others, and also for me(!) to read.

Given the different ways that x[y] can be used, adding new ones is not a
high priority!
(My opinion, anyway..)

RJF



> 
> FWIW
> Robert
>