-1

I think my question is really a symptom of a bigger problem; namely that I could really use some direction in how to properly think through the design of my intended software.

But in the stage where I am right now, I have code from different packages calling each other, making the packages co-dependent, as it were, and I wonder if this is a bad style/smell/practice. (I have, at the back of my mind, the notion that dependencies should be uni-directional, and packages ordered in a tree).

If so, are there any guidelines with regards to the do- and do-not-do practices of organizing software in packages?

(In my case it's Go, but could be Rust, Java, etc.)

1 Answers1

1

If each package is a self standing component, using the other package through a well-defined interface and in a way that would easily allow to replace the package by an equivalent one offering the same interface, then it's ok.

However, the way you present it, suggests that the packages know a lot of the internal details of the other package and it would be difficult to separate them. In this case it would be a bad design.

It's difficult to be more specific in view of your very general question.

Christophe
  • 81,699