On Sat, Mar 08, 2014 at 10:43:46PM +0100, Nathann Cohen wrote: > Tricks like this one makes it hard for people to work with category > code, and in particular to learn how it works by looking at the code. > Somebody said previously on this thread that "if somebody is playing > with categories, then he must have read the manual first" and I > believe that this is already wrong. Sometimes, you (= I ) have to deal > with category code, even though you do not know what it is, just > because you encounter a bug or because some part of the code forces > you to do something with categories (facades in Posets, for instance > ?). That's why you have standards like that, to make sure that > everybody can coexist and work together.
Yup. But on the other hand making everything completely explicit as in a plain hierarchy of abstract classes would require much duplication. Actually a potentially exponential growth of duplication. That would not make the code any easier to read. So it's all about finding the right balance. All I am saying is that, thanks from the strong semantic provided by math, the right balance is shifted a bit compared to more mainstream code. > To me it's a bit like for global variables. It's correct code, it > compiles, but it is hard to guess the source of the problem when you > are fighting with a bug. Even if it is documented somewhere, as you > have no idea what you are looking for exactly. Making the link > explicit is exactly the hint you need to tell you where you should go > in order to understand what happens. One difference being that each global variable needs to be documented, whereas here it's a one time shot to learn the meaning of the syntax. Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- 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.