#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 egourgoulhon):
Replying to [comment:27 nbruin]:
>
> An alternative is to migrate to the unspoilt
> {{{
> sage: z = symbol('z')
> sage: declare_symbol('w')
> sage: z+w+1
> z+w+1
> }}}
> and let `var` rot and fester, trying to nudge people away from it (put a
deprecation on it after a while?). In 10 years or so we could think of
removing `var`.
>
IMHO, this should be the good strategy. `declare_symbol` is a bit long
however and could be replaced by simply `symbol`, while the above `symbol`
could be replaced by something like `SR.get_symbol`. Indeed, the end user
has hardly the need of `z = symbol('z')` (am I right ?), so replacing it
by something "sophisticated" like `z = SR.get_symbol('z')` seems fine. To
summarize, the above code would become
{{{
sage: z = SR.get_symbol('z')
sage: symbol('w') # what end users really need
sage: z+w+1
z+w+1
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17958#comment:29>
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.