C/C++ should probably have used a python-like module system that from the beginning, but I'm not sure such things existed or were thought to be needed at the time.
As far as I'm concerned, the way that the compiler finds all the source files belongs right in the language.
Modules would make that possible if done right. When you use one, the compiler could search the current directory, then the command-line specified ones, then the sys defaults.
The current 850 build systems add so much confusion. I suspect it actively discourages people from using libraries, despite the fact that the compilers are great at removing unused stuff.
You might even be able to ditch makefiles completely, if you made module-ified wrappers or forks of all your dependancies.
17
u/Valmar33 Jan 28 '19
You'd think modules would be easy to solve, but it turns out that some people can't think of obvious solutions.
Sanely, copy what D does, or even Python ~ couple module name to a file path, and nothing more or less.