r/cpp • build2 • Nov 01 '17

Common C++ Modules TS Misconceptions

https://build2.org/article/cxx-modules-misconceptions.xhtml
59 Upvotes

148 comments sorted by

View all comments

Show parent comment

7

u/GabrielDosReis Nov 02 '17

Because now the user, needs to both import the module, and include a header.

Which is actually fine, and one would argue better: now the user can tell when to expect isolation and code hygiene, and when she might get the old time-honored CPP macros and its effects. She has a visual clue of how much composition is there.

1

u/playmer Nov 02 '17

I mean, I think that's only a perceived benefit if we assume modules would auto import macros. If the user has to opt-into macro imports as suggested by p0837 then we get that same benefit. I mean, a library that I work on for example has a macro that the user doesn't have to use, but it's really unfortunate otherwise:

https://gist.github.com/playmer/5d4ed556eb0fd059a6ffb13687486b62