#14608: Symbolic functions break the __hash__ contract
-----------------------------+------------------------
       Reporter:  vbraun     |        Owner:  burcin
           Type:  defect     |       Status:  new
       Priority:  major      |    Milestone:  sage-6.4
      Component:  symbolics  |   Resolution:
       Keywords:             |    Merged in:
        Authors:             |    Reviewers:
Report Upstream:  N/A        |  Work issues:
         Branch:             |       Commit:
   Dependencies:             |     Stopgaps:
-----------------------------+------------------------

Comment (by nbruin):

 Now that we've decided to sacrifice readability for reducing the chance of
 name collisions with variables in conversion from SR to maxima:
 {{{
 sage: x._maxima_()
 _SAGE_VAR_x
 }}}
 we could ensure that name translation from SR to maxima is injective as
 well. Theoretically, we could have
 {{{
 sage: function('f')._maxima_()
 _SAGE_FUNC_NAME_f
 sage: function('f',nargs=1)._maxima_()
 _SAGE_FUNC_NARGS_1_NAME_f
 }}}
 or something similar. Since LISP uses interned strings for symbols, it
 wouldn't even be inefficient in the "enhanced" interface to maxima_lib:
 once the dictionaries are seeded, the strings wouldn't be parsed. The
 strings-based interface would of course have a bit of a penalty, because
 it does all kind of regex stuff, so string length actually affects
 performance (but you'd probably have to work very hard to notice it)

 Note that this issue came up again on
 [http://ask.sagemath.org/question/30590/substituting-derivatives-in-
 taylor-expansions/ ask sagemath].

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