3 ms·
A Customer has a BillingContact, which references a Person, which has primary Customer. Boom, circular dependency. Happens in basically all corporate code bas
by perlgeek 5y ago
A Customer has a BillingContact, which references a Person, which has primary Customer.
Boom, circular dependency.
Happens in basically all corporate code bases that grow over the years, with varying path lengths.
Throwing all potentially circular types into one big module isn't a great solution.
(In practice, we tend to rely on run-time imports to make it work. Not really great, but better than throwing several 10k or 100k lines of code into a single module).
- deleted 5y ago[deleted]
- chrisseaton 5y agoI guess I don’t get why so you want to use separate modules if you aren’t getting the benefits of modularisation?
- perlgeek 5y agoI still get some benefits of modularisation, even if there are some cross-dependencies.