Hi Volker,

On 2014-08-08, Volker Braun <vbraun.n...@gmail.com> wrote:
> IMHO the majority of Sage doesn't actually use dynamic category refinement 

I was not talking about dynamic category *refinement*. But so-called
"dynamic classes" (that are created on the fly) are fundamental for the
category framework to work. And since you suggested using metaclasses: A
metaclass that combines a given class Foo with methods inherited from
parent classes of categories does exactly the same. The metaclass
would return the exact same dynamic class that is currently used to
override self.__class__.

> and/or make the category depend on the arguments.

But these are important cases. Modules versus vector spaces, for
example.


> You still don't need differently-named classes Foo and 
> Foo_with_category. 

I am not sure if I agree with you here. Both the actual metaclass that
you suggest and the "virtual" metaclass that is in use by the current
category framework takes an explicitly given class Foo (defined in some
module) and adds methods that are taken from somewhere else. Nontrivial
steps are involved to create the result. It *is* substantially different
from Foo. Therefore I believe it is honest (and less confusing) to give
it a new name, since it is *not* Foo.

Best regards,
Simon


-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to