Why is it cursed? Package managers are the wrong way to go for C++, IMHO. Just look at the bugs and bloat that every package manager is suffering right now. Rust isn't far behind. Keep C++ away from this.
EDIT: I just learned module systems are NOT package managers.
1) Headers cause programmers to take dependencies without realizing. (Especially when unity builds are setup).
2) They are fragile because they involve putting file paths into the code.
3) They cause build information to be in the code rather than with the other build information. To find out what is really being consumed I have to search every code file.
4) They cause all kinds of issues for beginners such as multiply defined errors.
5) They cause the compiler to revisit code hundreds even thousands of times bloating build times. (This is such an extensive problem a small industry has sprang up to address it i.e. precompiled headers, unity builds, fastbuild, etc)
6) They introduce confusing bugs (someone modifies a header in a dependent library but not the dependency, literally had to fix this for a 10 year+ game programmer at a studio you would know. Turns out adding virtual functions in a header will cause an off by 1 vtable lookup and hilarity insues.)
> Package managers are the wrong way to go for C++
I didn't say anything about a package manager. Modules don't require package managers. In .net you can use Nuget or not but the complier understands how to take source and an assembly and hook them up.
I just want a sane way to tell the compiler to build one thing and then use that when it builds the next thing. Rather than this weird concept that every TU has to stand completely on its own.
Getting rid of the pre-processor would be a radical evolutionary step for C++. You would have a devil of a time interfacing w older code, esp. C code. At that point, just start using a different language altogether.
> Getting rid of the pre-processor would be a radical evolutionary step for C++.
I said nothing of the kind! Obviously, that is not tenable at this time. But it's entirely possible to add a module system by which new code can take dependencies without the cumbersome #include mechanism.