On Mon, Mar 16, 2009 at 11:51 AM, Joel B. Mohler <j...@kiwistrawberry.us> wrote:
>
> On Monday 16 March 2009 12:27:10 pm kcrisman wrote:
>> sage: integrate(y^2)
>> ---------------------------------------------------------------------------
>> TypeError                                 Traceback (most recent call
>> last)
>> TypeError: cannot coerce type '<type
>> 'sage.symbolic.expression.Expression'>' into a SymbolicExpression.
>>
>> Of course, the current error is because we haven't done the switch to
>> Pynac for everything yet.  Why this would not still be valid input (to
>> echo Ronan) after the switch is mystifying to me - again, or perhaps I
>> have misinterpreted the deprecation proposal.
>
> Here's my reason for wanting it deprecated.  It's fragile in the face of
> unexpected input (I don't like being lulled into a false sense that my code
> works when suddenly it wouldn't work for a constant input):
>
> sage: f=x
> sage: # many lines of code
> sage: integrate(f)
> x^2/2
>
> sage: f=1
> sage: # many lines of code
> sage: integrate(f)  # what does this mean?
> ... hangs maxima ...
> sage: integrate(f,x)  # what does this mean?

This seems like an excellent reason to deprecate
integrate(SYMBOLIC_EXPR), and I would vote in favor of doing so, but
my patch won't do it.  (My patch is about deprecating __call__, and
things that invoke __call__ or the equivalent; symbolic integration
doesn't call the expression.)

Note that plot(1, (5, 7)) and numerical_integral(1, (5, 7)) don't have
the same problem, and I'm currently not planning to deprecate them.
(It's not always entirely clear who was agreeing to what proposal, but
I get the impression that this is a compromise everybody can live
with.)

Carl

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to