On Feb 22, 2010, at 4:01 AM, Martin Raum wrote:

Hi all,

I just reviewed #8276 based on the discussion in
http://groups.google.com/group/sage-devel/browse_frm/thread/1042edd11b3854b2
.
For me a great problem arises with this change, though the majority
voted for it. I think about it as follows.

The categories framework has introduced a function zero for every
commutative monoid. Its standard definition is return self(0).
MatrixSpace(...)(0) is mutable. Now, we overwrite this in
matrix_space.py, which is an object of this category by zero =
zero_matrix and zero_matrix returns an immutable matrix.
Hence, zero returns a different value, than the framework implies and
I am concerned about this. Still Sage lacks unification and for me the
categories framework promised to change this by defining standard
functions and their return values. I am not opposed to optimized
implementation, but I am opposed to changing return values. Since,
now, I will have to explain my students, that normally zero will
return the same as self(0), but for MatrixSpaces the situation is
slightly different. This is Pandora's box.

Well, it's still returns the same matrix at least, so I'd call it consistent.

I suggest to make zero as well as one just synonyms  for self(0) and
self(1), respectively, and leave zero_matrix and identity_matrix as
they are.

I'm fine with that.

- Robert

--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to