Le 04/05/2020 à 02:27, Michael Orlitzky a écrit :
On 5/3/20 8:09 PM, Matthias Koeppe wrote:
I propose the following goal for Sage 9.3.
Modularize sagelib so that individual parts of it can be built and run
with a much smaller set of libraries.
A noble goal, but it's going to be difficult given the widespread use of
lazy_import to create circular references. We're probably looking at a
lot of refactoring before any useful modules can be excised. But that
doesn't mean it's not worth trying.
A good first step might be to ban new circular imports, but that means
that e.g. parent structures and their element classes would need to be
defined in the same files for things like
class FooElement(...):
pass
class Foo(...):
Element = FooElement
to work. And I'm sure that's not the only widespread antipattern that
will be uncovered.
The category framework can not really be separated from the
Parent/Element/CategoryObject (e.g. coercion is involved in
comparisons and binary operations). And the former can not
live without the integers (e.g. the output of .cardinality()
expects an integer). More dramatically, in sage.categories
bimodules imports QQ, RR
classical_crystals imports SR
finite_coxeter_groups imports QQbar
One can try to not populate the whole category system.
Given the current status of the library, I don't think this
is reasonable to state it as a milestone goal. But still, it
is desirable to introduce modularity. Starting with a
sage-core / sage-rest would be nice.
Best
Vincent
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/1cacc777-befb-56ec-70fc-3dd30ccc9b44%40gmail.com.