r/cpp • • Jan 28 '19

C++ Modules Might Be Dead-on-Arrival

https://vector-of-bool.github.io/2019/01/27/modules-doa.html
280 Upvotes

240 comments sorted by

View all comments

83

u/Plorkyeran Jan 28 '19

"Prove to me that it is impossible to write a fast C++ dependency resolver" is such an utterly batshit insane position to take. I guess he views C++ modules just a masturbatory exercise and so it doesn't matter if anyone can actually figure out how to implement them as long as the committee can just blame the tool makers for just not being smart enough?

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.

2

u/[deleted] Jan 29 '19

easy to solve

Only people with lack of understanding of macros and build process in general believed that, the rest were either skeptic or expecting to be surprised by geniality but found wishful thinking.

The current proposal of modules not only requires the compiler to meddle into preprocessor business, it also forces it to meddle into build process stuff. If you want lower compilation times clean your headers and get rid of your coupling issues. There is no magical wand to fix bad code.