#17958: implement declare_var
-------------------------+----------------------------
   Reporter:  rws        |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-6.6
  Component:  symbolics  |         Keywords:
  Merged in:             |          Authors:
  Reviewers:             |  Report Upstream:  N/A
Work issues:             |           Branch:
     Commit:             |     Dependencies:
   Stopgaps:             |
-------------------------+----------------------------
 Functions returning a value should not have side effects, `var` does. In
 #17447, comment 23 Nils Bruin proposed to separate both usages of `var` by
 introducing `declare_var`: this should behave exactly like `var` without
 return value, i.e.
 {{{
 sage: var('y')
 y
 sage: declare_var('y')
 y
 sage: y = declare_var('y')
 sage: y
 sage: type(y)
 <type 'NoneType'>
 }}}
 Later, after all books are changed, `var` without return value should be
 phased out.

 This and the same with functions is the most annoying problem for people
 doing calculus in Sage.

  * http://ask.sagemath.org/question/8145/difference-between-varx-and-
 xvarx/

--
Ticket URL: <http://trac.sagemath.org/ticket/17958>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to