Hi Jeroen, On 2017-12-11, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: > On 2017-12-10 22:29, Nicolas M. Thiery wrote: >> As far as I remember, it's stipulated that any Parent should be in >> Sets. > > I don't think that this is stipulated somewhere.
I think I stated it in the thematic tutorial on "how to implement new algebraic structures". > I also feel that this shouldn't be a hard requirement. I think it should! For category objects that are not sets, one should use CategoryObject. For user-visible objects in Sage that haven't anything to do with categories, one should use SageObject. And for everything else, Python gave us <object>. > I think that the low-level basic stuff > (I consider creating elements amongst that) should work without > categories and that categories should only be used for additional > functionality on top of that. Except if the basic functionality refers to category stuff. Element creation does! >> Is there a use case where having this in Parent would be preferable? > > I can think of two reasons: the first is efficiency. +1, although currently I don't know an example where this actually results in a noticeable problem. A couple of years ago though, it was a serious bottleneck. > Second (as Travis also > said), creating elements is partially implemented in Parent and > partially in Sets. This is quite confusing and it would be best to do > this in one place. +100. I think the current implementation has too many levels of indirection and too many hooks for the implementation of a single functionality. Cheers, 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.