#17958: implement declare_var, deprecate (None)var
-----------------------------+------------------------
       Reporter:  rws        |        Owner:
           Type:  defect     |       Status:  new
       Priority:  major      |    Milestone:  sage-6.6
      Component:  symbolics  |   Resolution:
       Keywords:             |    Merged in:
        Authors:             |    Reviewers:
Report Upstream:  N/A        |  Work issues:
         Branch:             |       Commit:
   Dependencies:             |     Stopgaps:
-----------------------------+------------------------

Comment (by nbruin):

 Replying to [comment:56 was]:
 > It is also common for a Python function to do something with side
 effects -- e.g., run a subprocess -- and also return some information
 about what it did, e.g., the exit code.    This is computer programming,
 not mathematics.

 I thought something similar originally as well (although I thought "this
 is mathematics software, not computer programming"), but after seeing
 several questions from people getting thoroughly confused, I came to the
 conclusion that in this case having a side effect ''and'' a return value
 is a major source of confusion. See the original comment
 [http://trac.sagemath.org/ticket/17447#comment:23]. This is exacerbated by
 the fact that `x=var('x')` is very common in the documentation, which
 further trains people to be unaware of the side effect of `var`. See
 comment:32 for a hypothesis on why this happens (which argues why the
 return value of the side-effect-having `var` is a nuisance rather than
 helpful)

 We really need to decide if deprecating the current behaviour of `var` is
 ever going to be doable (possibly with supporting indefinitely). If it's
 not we can stop right now: we'll just be adding extra interfaces which
 will only confuse people more. In that case it'll just be another victim
 of the tar-pits of interface compatibility (which does have value).

--
Ticket URL: <http://trac.sagemath.org/ticket/17958#comment:58>
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