Hi there,
At the moment I am working a bit with modules and trying to figure out the best way to avoid circular dependencies. I know that this sort of dependency can be simply “allowed” by requiring modules through an initialization function to allow the modules to execute. However, as I have read, it’s ideal that you don’t have any circular dependencies in the first place.
Instead of bypassing circular dependencies I was thinking in a way to keep the dependency linear. I was thinking of using a hierarchy such as this one:
Where basically Module A is the Master Module containing information that is needed by Module B and C eliminating the need to intertwine them together.
The hierarchy can be expanded by adding more “children”.
Does this help with circular dependency?