On 2013-07-27, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> I don't understand the gensym proposal -- under what circumstances would it
> be useful to carry out plot2d(%pi,[%pi,0,1]) rather than giving an error?
> (Currently, it plots 3.14 for x=0..1!)
>
> Every command that requires a symbolic variable argument should give an
> error when called with a symbolic constant. I see that we are doing a poor
> job of this: shockingly, none of *diff, integrate, plot2d, taylor, at,
> allroots* perform this common-sense check, though some other functions do.
Well, it doesn't seem so obvious to me. In general I am inclined to
allow Maxima to do things which don't make much sense, as long as it
is consistent and therefore predictable and comprehensible. I don't
know why someone would want plot2d(%pi, [%pi, 0, 1]) but if they want
it, by gum, let them have it. (Incidentally, the right answer is this
case is a diagonal line from (0,0) to (1,1) -- a constant 3.14 is
incorrect.)
I recall there is the age-old trick of differentiating with respect to
%pi in order to solve some integral. I'm not inclined to prohibit that --
whether it makes sense is the user's problem, not ours.
At this point I'm not 100% in favor of one proposal or the other,
although I am leaning toward gensym substitution. But I might change
my mind.
best
Robert Dodier