3 ms·
That's me when I use languages that don't support circular imports. Can't have circular imports if everything is in the same file. Taps head.
by matsemann 5y ago
That's me when I use languages that don't support circular imports. Can't have circular imports if everything is in the same file. Taps head.
- _benj 5y agoFor me the limitation of circular imports forced to drastically rethink how I architected my software (golang, rewrote the whole mvp 3 times be the first two I was either completely blocked by no-circular-imports or the structure felt so hacky that I didn’t even wanna touch it… then I learned about interfaces!!)
- tuyiown 5y agoJust in passing, generally you can break circular import by isolating the coupling that triggers the circle chain in a file dedicated to that. Bonus : each coupling use case gets to be explicit
- heavenlyblue 5y agoPython allows for circular imports as long as you don’t directly import things you use but instead their modules for example. Is that the same for all languages?