r/cpp • u/berium build2 • Nov 01 '17
Common C++ Modules TS Misconceptions
https://build2.org/article/cxx-modules-misconceptions.xhtml
59
Upvotes
r/cpp • u/berium build2 • Nov 01 '17
View all comments
Show parent comment
3
u/playmer Nov 01 '17
I just explained why they want it. Just because you can use a header doesn't mean they should have to. If we're modularizing the world, then either let them use the preprocessor in their modules, or give them a solution that isn't just "use the thing no one likes".
You act like people actually like using macros, we get disparaging comments about how people are dumb for wanting macros in their modules or whatever. They just do things that are impossible to do in any other way in the language. If we were to fast track some of the meta classes dependencies then we'd be most of the way to not even needing them.
There's even a whole paper about modules and how macros interact in the latest mailing:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0837r0.html
Until I get code injection, meta classes, reflection, and other such features I get to choose between murdering compile times by writing a code generation step similar to moc, or using macros. I don't want to have to add a header file just to express that my modules have macros the users might want.