> A <: B either tells you if a type A is of abstract type B or if abstract type A is of abstract type B. > > > So, whether or not you use RingElement or Ring depends on whether you > consider an element of ZZ to be a ring element or whether you think the > integers ZZ form a ring. > > With the machine types, we really want a :: T where T <: Integer <: Ring. > Again with the baremodule idea, we might be able to do this, but it's not > possible if you use the standard provided modules, as far as I can tell. >
I guess to me the only names that would really make sense would be ZZElement <: RREelement <: RingElement (or else rename the builtin types to something else: it's "Integer" that's not the same of a set!! Rename it Integers and everything makes sense). Anyway, I probably need to learn to think differently about this. I do wonder about one thing. Since it is not possible in Julia to have instances of abstract types, and you have ZZ <: RR with the possibility of doing ZZ(3) as well as RR(3), does it mean that you've created supplementary concrete types, say ZZ_concrete <: ZZ and RR_concrete <: RR or similar, together with a bunch of constructors to hide everything? If so, I find this quite complicated. Here good old OOP treats this much more elegantly. But perhaps I am mistaken? Pierre -- 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.