On Dec 3, 2008, at 7:54 PM, Jason Grout wrote:

> Robert Bradshaw wrote:
>
>>> Another way to do it might be to have classes like Integrate (as
>>> opposed
>>> to functions), that represent an integral.
>>
>> I'm not a fan of making such a distinction based on the
>> capitalization of the first letter, but it would make sense to have
>> integral (the noun) be unevaluated, and integrate (the verb) actually
>> do the work.
>
> That presupposes a good working knowledge of the English language (at
> least the subset having to do with mathematics), which may not be a  
> bad
> thing, but also puts up another barrier to new users.  I know that
> probably half of my ODE class would say that the verb associated with
> "derivative" is "derive" (well, at least at the start of the semester;
> hopefully they don't have that association anymore).
>
> The nice thing about the capital letter is that there is only one
> command name, and a very systematic tweak that changes it from  
> active to
> inert.  Actually, since python style is to have camel-case class  
> names,
> but lowercase functions, using camelcase for the inert versions
> (constructing a class object) would fit rather nicely.  In other  
> words,
> Integrate constructs an integral object, while integrate is a function
> that you call and it returns an answer.

This requires good working knowledge of python style, which is even  
rarer than good working knowledge of English :).

Of all the options, I think passing a keyword like "unevaluated=True"  
is the best one so far. It's certainly going to be the less common  
desired behavior, and I think.

sage: latex(integral(x+x, x, unevaluated=True))
'\int 2x dx'

is natural despite having simplified the x+x.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to