2 ms·
> Now you have a circular import problem; glhf But why not collapse into a single module at this point if you can’t avoid dependency? What are the separate mod
by chrisseaton 5y ago
> Now you have a circular import problem; glhf
But why not collapse into a single module at this point if you can’t avoid dependency? What are the separate modules adding at this stage forward?
- lp251 5y agoYou can, but sometimes it’s not ideal. I ran into this when A and B had many derived classes. I wanted to put A and it’s derived classes in one module, and B and it’s derived classes in another. It was messy. I wound up putting A and B in a single module and having a separate one for the derived classes. Not ideal.
- nemetroid 5y agoIt does sound ideal to me, or at least better than the initial proposal. A and B both need to know about the other's base definition, neither cares about the details about the other's derived classes. Splitting it into three modules shares as little surface area as possible.