Op vrijdag 11 januari 2013 21:27:17 UTC+1 schreef Nils Bruin het volgende:
>
>
> Isn't the real bug here that Matrix uses a much too heavy device to 
> keep track of a boolean flag (mutability=true/false)? Spinning this 
> off into a full-blown python class is just ludicrous for something as 
> fundamental as matrices. 


I couldn't agree more. I assumed that "someone probably had a reason for 
that", but looking at the definition of the Mutability class 
(sage/structure/mutability.pyx), it's just ridiculous. (I guess it would be 
useful if multiple inheritance were possible in Cython, though).
 

> If you rewrite that to be implemented via a 
> straight bint on matrix instances itself, the proper init code of 
> matrices will become much cheaper and perhaps not a hurdle for 2x2 to 
> call? In particular, it means the flag could be inited in the 
> __cinit__ of matrices and hence automatically be initialized. 
>
> I'd assume there's very little code that depends explicitly on HOW 
> matrices keep track of their mutability. 
>
> Compared to rewriting 2x2 to not inherit from Matrix (which I think 
> would indeed be necessary if you want to adhere to protocol: doesn't 
> inheriting mean relying on the initialization of the class you inherit 
> from?), making that change might not be so bad and it would benefit 
> much more of sage. 
>

 Agreed.

Timo

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to