#9704: refactor "trace" -- make trace command call trace method on input if
available
---------------------------+------------------------------------------------
   Reporter:  was          |       Owner:  jason       
       Type:  enhancement  |      Status:  needs_review
   Priority:  minor        |   Milestone:  sage-4.5.3  
  Component:  misc         |    Keywords:              
     Author:               |    Upstream:  N/A         
   Reviewer:               |      Merged:              
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by jason):

 Replying to [comment:6 cremona]:
 > Sage already has _lots_ of functions f() which do very different things
 depending on the type of the arguments.
 >
 > How about making the trace(x) function do what others do, which is to
 try returning x.trace() and if that fails do what the code_trace function
 does?

 Is there any other examples in Sage where a function does:

   * mathematically meaningful stuff (which may differ, depending on the
 mathematical object), and returns a mathematical answer
   * and also does something which is entirely non-mathematical, on a
 completely different level (a programming nuts-and-bolts debugging level,
 rather than a math level)?

 The big conceptual difference between those two purposes is why I think
 having two functions, say {{{trace()}}} (which calls {{{x.trace()}}}) and
 {{{trace_execution()}}} (which does what trace does right now) is a much
 better design than lumping things into one function.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9704#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to