3 ms·
Instead of creating a new programming language, SageMath uses the extremely popular programming language Python (with some optional minimal preparsing). Thus t
by williamstein 11y ago
Instead of creating a new programming language, SageMath uses the extremely popular programming language Python (with some optional minimal preparsing). Thus the language design decisions were mostly made by software engineers, rather than mathematicians. That said, the only sense in which you have to declare variables is that you can't just write x + y without any further thought (you have to write "y=something" first). This avoids some mistakes due to typos, which are common in Mathematica. It also makes it easier to endow variables with more precise structure (e.g., make y a polynomial over a finite field).
- pbhjpbhj 11y agoSounds like it would be relatively easy to then optionally pre-parse and automate the variable declaration cutting input considerably (for those who wished it) ... I'm sure that's been done already in such a long lived and popular project. Thanks for you response and insight. Must give sage a try again.
- williamstein 11y agoYes, I did implement that once. It's in the Sage Notebook (see here http://doc.sagemath.org/html/en/reference/notebook/sagenb/misc/support.html http://doc.sagemath.org/html/en/reference/notebook/sagenb/mi...), but nobody implemented it for the command line, and I haven't reimplemented in SageMathCloud worksheets yet. I've opened a ticket: https://github.com/sagemathinc/smc/issues/419 https://github.com/sagemathinc/smc/issues/419