Imho many sage modules have grown too long, including but not limited to some 20kloc monsters. +1 to splitting things up!
On Monday, May 30, 2016 at 6:22:53 PM UTC+2, Erik Bray wrote: > > Hi all, > > I recently needed to dive into the sage_setup.autogen.interpreters > module in order to make some small changes. The file is over 4000 > lines long, which is a bit on the long side for your typical Python > file, though not egregious by any means. That said, when trying to > understand some relatively complicated code I find it helpful to break > up into smaller bite-sized logical chunks that are easy to get around > in an editor and reason about. When and how to do this can of course > be highly subjective. > > In the case of autogen.interpreters, in the process of understanding > it, it was my immediate instinct, perhaps a bit impulsive, to start > breaking it into multiple files anyways, and about half an hour later > I've done so with success. > > I think it would be a good change to feed back into sage, but it's > also a bit frivolous since there are no other substantive changes. I > think it makes the code easier to understand. But of course the main > downside to this kind of refactoring is that it makes the history > harder to follow--not impossible--just harder. > > How does this community feel about this sort of refactoring? On the > outset it could be seen as frivolous, but in the long term it can be > for the best, especially as development continues and some of the > resulting modules grow larger on their own. > > Thanks, > Erik > -- 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.