In the previous discussion concerning properties on Matrix, there seemed to be consensus that Matrix.I was a problem. More generally, only little defence of the general use of properties in the public API was given.
Therefore, I suggest that we phase out *all* uses of properties in the public API. The main reasoning is consistency: we are much more ubiquitously using methods to get information on objects, and it is inconsistent, confusing and unnecessary to use properties in arbitrary places, just to save a two keystrokes. I grep'ed for @property and found no instances of public properties that could not easily be methods instead (*). Some cases are even super-inconsistent, such as MPolynomialIdeal.basis (basis() is a method on all other classes I know of). I call for the following vote: [ ] Phase out all uses of properties in the public API and make them into methods that take no arguments. Add in the developer's manual somewhere that this is the general policy. [ ] Phase out properties which perform any non-trivial computation, and officially condone the use of properties as "getters" of trivial private information. [ ] Phase out properties that might (expectedly) throw exceptions, such as Matrix.I. Condone the use of properties as "getters" of derived information, such as Matrix.T (transpose). [ ] Keep things as they are. For the record, my vote is on phasing out all properties. There is a technical problem with how to issue proper deprecation warnings. One possibility is to insert deprecation warnings now for >1 year, and then do the change at a major version. But I think it's more important to decide how extensively we want to change things first. Best, Johan (*): Simon King hinted earlier at possible performance degradations, though. I don't know much about this. -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.