Of course nobody can stop you from setting the element's parent manually. 
Though thats clearly not recommended.

Existence of coercions, say, depend on the parent only so the two elements 
better have the same interface.

As for the "identity map" example, if that were a subclass then you would 
also have to check that a map is the identity whenever you compose maps and 
construct the subclass. From a performance point of view that is most 
likely sub-optimal.


On Wednesday, February 4, 2015 at 5:57:51 AM UTC-5, Jeroen Demeyer wrote:
>
> Is it possible in Sage to have a Parent which has different Element 
> classes? I.e. two Elements A and B such that 
>
> parent(A) is parent(B) 
> but 
> type(A) is not type(B) 
>

-- 
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