In essence, I am in search of a method to limit dependencies, similar to how one would manage different projects (libraries) in Java or C#. Think of it as friend or internal access modifiers.
I'm considering various approaches to accomplish this (such as creating loaders to ensure only approved dependencies are utilized), but I find it hard to believe that this hasn't been addressed previously.
It's worth noting that my focus goes beyond simply encapsulating classes. Currently, my approach involves restricting modules to referencing only those within their own folder structure or the index files of other modules.
Could it be possible that no one has ever encountered this need before?