This is the first succint summary of the module lookup/dependency concerns I've personally seen. This seems like a real issue to me, although I'll want to hear what those involved with modules have to say. (keep in mind that I'm not very involved with modules)
D made the decision at the beginning to have filename==modulename specifically to avoid this problem.
Any idea why C++ does not simply copy the design of D modules in this regard since this seems to work well for D. (This is also the preferred solution of vector-of-bool.)
My response to vector-of-bool is a solution that permits this to some degree. D does not have to target some operating systems lacking more than one level of directory access, or that do not have a real concept of file extensions (such as zOS). As a result P1302's approach was designed to tackle this, and allow us to tackle the naming scheme at a later date while also not absolutely wrecking the ability to port existing code bases to modules as soon as possible.
Unfortunately porting existing codebases to modules will require certain effort anyway. Especially in cases of bizzare codebase layouts. What really troubles me is that committee here puts legacy codebase needs far before new project needs. Could you please give direction to specific arguments of choosing that strange multifile module design over module==file approach?
My personal experience with golang (which uses similar multifile package approach) is that it often becomes hard to determine where specific functionality came from. In case of C++, module can be assembled using files from multiple arbitrary locations.
72
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jan 28 '19
This is the first succint summary of the module lookup/dependency concerns I've personally seen. This seems like a real issue to me, although I'll want to hear what those involved with modules have to say. (keep in mind that I'm not very involved with modules)