3 ms·
I love Sage! But, which was the rationale to build Sage as a standalone programming language/environment instead of being more integrated into Python? I assume
by skdotdan 8y ago
I love Sage! But, which was the rationale to build Sage as a standalone programming language/environment instead of being more integrated into Python? I assume syntax, basically?
- williamstein 8y agoI built Sage initially to provide a free open source alternative for number theorists to parts of Magma (http://magma.maths.usyd.edu.au/magma/ http://magma.maths.usyd.edu.au/magma/), and Magma is self contained with batteries included. In 2004, almost none of the academic colleagues I knew used Python (and definitely not for math), and the Python packaging situation was a mess (it continued to be a mess for many years after, but is in relatively good shape now with Conda and Pip). Python was also "just" the programming language of Sage, with Sage itself being mostly new code combined with other major standalone software (PARI, GAP, Singular, etc. -- all having their own languages, with their own packaging, CLI's etc.). It was not at all clear how Sage would grow -- perhaps Python would just be one of many languages for using Sage? If I had real resources to devote to Sage today (I don't), I would break Sage up into a core Python library, and lots of other libraries, and make them all available as standard pypi (and conda) packages. Doing so would be extremely difficult, because the main monolithic Sage library is so massive at this point (on the order of a million lines -- contributed by 600+ people), and since it's Python pretty much everything in any module is public (unlike say Javascript modules where code is private by default). Also, the dependencies in this code are ill defined and complicated (the class diagram is insane). On the plus side, we have extremely good automated test coverage and testing infrastructure. The rationale wasn't syntax -- the entire Sage library is written in standard Python (and Cython), and the only special syntax Sage has is mainly used for the command line interface (and .sage files), and that's all done via an optional module called "preparse" (which could just be a pypi package if it got factored out).
- snrji 8y agoI see. Thanks for your work (and answer)!