6 ms·
Well, that's just the normal way to write software, no? Aside from some websites and small scripts, all software is written like that. You simply create a hie
by devit 2y ago
Well, that's just the normal way to write software, no?
Aside from some websites and small scripts, all software is written like that.
You simply create a hierarchical directory structure where the directories correspond to modules and submodules and try to make sure that the code is well split and public interfaces are minimal.
- stavros 2y agoNo, the fashion so far has been to put a network under all that.
- bluGill 2y agoWell you try that but in general someone in a different module discovers this thing you have over here is useful and starts using it and before you know it you have everything tightly coupled to everything else. not getting the above is hard.
- devit 2y agoAll non-toy programming languages support encapsulation, usually implemented with "private" or "public"/"export" keywords (well-designed languages make private the default), which means that unless the "thing" was marked as public/exported, in which case it's designed to be reused and stable and thus it's OK to depend on it, that will trigger a compiler or runtime error (in well-designed languages, a compiler error). Obviously, in that case it's perfectly normal and acceptable to either export or make public the thing, if it is a good idea for it to be part of the module interface, or if that's not a good idea factor out the useful thing and make it a 3rd module that both the original and new modules depend one; this should come with some documentation about the interface if it's not obvious or fully specified by the types.
- bluGill 2y agoThey try but there is puplic to this submodule but not the full module.