Simon You raise a number of very good points. In my case, my matrices are produced by some other routine or will be read in from a file. When I do type in small matrices, I've never found the syntax to be a problem. The sort of thing that has annoyed me is that matrix() and Matrix() both work, but vector() does not, only Vector(). And if P is a graph then P.am().charpoly() works but P.charpoly() does not (but both A.characteristic_polynomial() and P.characteristic_polynomial() do).
The point being that consistency is more important than the details of syntax, in part because it makes the syntax easier to learn and to remember. Sage does tend to have problems with consistency between areas. Since one of sage's strength versus matlab is that it is a general purpose package, I think this issue merits some attention. Also, if you look back at the problems in this thread raised by people with numerical experience, I do not think syntax was a significant issue. Chris On Aug 19, 6:21 pm, Simon King <simon.k...@uni-jena.de> wrote: > On 19 Aug., 21:26, Jason Grout <jason-s...@creativetrax.com> wrote: > > > But then what about: > > > [1, 2, > > 3, 4] > > Note the small difference: > [1,2, > 3,4] > is a list in Python. But > [1,2 > 3,4] > (if I am not mistaken) is a syntax error in Python, and thus the > preparser could preprocess it and turn it into a matrix: > > The line break replaces the semicolon, hence, the example that you > give corresponds to [1,2,;3,4] (which hopefully is a syntax error in > Matlab), while the second version becomes [1,2;3,4] (which seems to be > the matlab idea of a matrix). > > That said, I think one of the strength of Sage is to use a mainstream > language. It should not be weakened too much by syntactical sugar, in > particular if it lacks precision (by gratuitous assumptions on the > base ring). > > Concerning some matlab users feeling irritated by any deviation from > matlab syntax: I guess that Sage is not going to be a Matlab clone, > and thus that kind of users is lost. > > Every thinking person must be aware that, to some extent, *the same* > idea can be expressed in different languages. I hope that every person > working in numerics would not mind to use a CAS with a decent > programming language, provided that it offers *the functions* (but not > necessarily the function names or the syntax) of Matlab. > > Concerning matrices: Are people working in numerics really > interactively typing in matrices? Or are they usually just reading > matrices from files that are created by programs (e.g., based on data > from an experiment)? If the latter is the case then syntactical sugar > wouldn't really matter. > > Cheers, > Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org