"sum" quotes its arguments -- what's up with that?
Subject: "sum" quotes its arguments -- what's up with that?
From: Richard Fateman
Date: Tue, 07 Dec 2004 08:46:26 -0800
I think that many of the problems, with integrate, sum etc.
would disappear if one insisted
on a notation that was better.
For example, borrowing from lisp or scheme...
instead of sum(i,i,1,3)
we could have
sum ( lambda([i],i), 1..3).
Thus it is clear where i is bound.
Stavros Macrakis wrote:
>>The reappearance of certain topics over a period of years
>>might be considered evidence that, in fact, something is wrong.
>
>
> Yes, something *is* wrong -- Maxima doesn't understand variable scope
> in sum, integrate, plot2d, or even lambda in many cases.
>
>
>>are simple workarounds -- quote i or use j instead.
>
>
> I don't agree that quoting i is a good solution here, though I *do*
> agree that autoquoting the argument is *also* a poor solution.
>
>
>>There is an analogous and equally strong argument for
>>making "integrate" an mspec. Shouldn't "sum" and "integrate"
>>both be mspecs or both mfuns?
>
>
> Yes, please read my earlier postings (and bug reports) on precisely
> this issue. Integrate and sum are inconsistent -- in fact sum is
> internally inconsistent.
>
> -s
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima