#15247: Introduce a baseclass for singletons
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.1
Component: performance | Resolution:
Keywords: | Merged in:
Authors: Simon King | Reviewers: Marc Mezzarobba
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/mmezzarobba/15247-singleton_class| 207f6b72c0dc4601732c5ca0ee722c4c43c95709
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by mmezzarobba):
* commit: 848952746e60990b25a0cf013081f5fad4ffe6e3 =>
207f6b72c0dc4601732c5ca0ee722c4c43c95709
* branch: u/SimonKing/ticket/15247 => u/mmezzarobba/15247-singleton_class
* reviewer: => Marc Mezzarobba
Comment:
* I am a little bit skeptical about tying the singleton behaviour to
comparison by identity if `SingletonClass` is meant to be ''the'' way to
implement singleton classes. Indeed, this makes it virtually unusable for
Elements as long as sage keeps abusing `==` to implement semantic (as
opposed to syntaxic) equality. And singleton classes descending from
Element have at leat one natural use case, namely well-known constants
(infinities, pi...). Could you please comment on this choice?
* I don't like having the same explanations and/or tests repeated in
several docstrings. I tried to remove redundancies in c5acb88a and
949b7b2aa. But feel free to revert these commits if you disagree!
* The same goes for 207f6b72, where I applied `SingletonClass` to other
parents (initially to check how usable it was in practice, but since it's
done...).
* Finally, I made a few minor changes in d9ca799c. Could you please check
that none of the things I "fixed" was intentional?
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=d9ca799c3b511cba8a113a5c624725fc57f95672
d9ca799]||{{{SingletonClass: cosmetic changes.}}}||
||[http://git.sagemath.org/sage.git/commit/?id=c5acb88aba8a5665bcb7d18f6254d593a7ab4bfa
c5acb88]||{{{SingletonClass: Less redundant docstrings}}}||
||[http://git.sagemath.org/sage.git/commit/?id=949b7b2aa6fb3c1dbc711d5a2776c39127d338ab
949b7b2]||{{{QQ/SingletonClass: Delete redundant doctest}}}||
||[http://git.sagemath.org/sage.git/commit/?id=4123a503029daccca3b58deb18a389924a3ea86c
4123a50]||{{{Merge in '6.1.rc0' to prevent whitespace conflicts}}}||
||[http://git.sagemath.org/sage.git/commit/?id=207f6b72c0dc4601732c5ca0ee722c4c43c95709
207f6b7]||{{{Make QQbar, AA, and PariRing 'SingletonClass'es}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/15247#comment:25>
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/groups/opt_out.