I’m creating a package (mostly for personal use, and for sharing with a few people, but not like “going into the general repository” standards here), and one of the questions I’m running into is where exactly to split the files up. At some level, this feels like a personal choice, but I’ve been getting into learning the idiomatic/Julian ways to program things. So, are there basic guidelines as to where to split the files in the src directory up?
For a more specific example, that I’m really quite on the fence about: I’ve got a struct that is composed of other structs for a few layers. It’s basically such that struct A is composed of an array of struct B’s and some other stuff, and struct B is composed of an array of struct C’s and some other stuff. Right now, I have all of the struct definitions and their “constructors” in the same file. But it’s getting a little large. Are there general guidelines to when I should split that file, or should it have always been split from the beginning? And if I do split it, should I put them all in a subdirectory of src? Additionally, I have some utility functions that are basic handling of some of these structs in a different file. Should these be included with the struct’s definitions/constructors?
Even if there aren’t general guidelines or such, I would love to hear what’s worked for you! Let me know if I need to be more specific with my example