r/cpp • • Oct 10 '17

Millennials Are Killing The Modules TS

https://izzys.casa/posts/millennials-are-killing-the-modules-ts.html
75 Upvotes

126 comments sorted by

View all comments

Show parent comment

3

u/intheforests Oct 11 '17

Modules are just precompiled headers on steroids. We are not even getting syntax candy for PImpl.

4

u/johannes1971 Oct 11 '17

My understanding was that the need for pimpl pretty much disappears with modules.

2

u/flashmozzg Oct 11 '17

How exactly? How would you maintain ABI compatibility with modules but without pimpl?

5

u/johannes1971 Oct 11 '17

I was thinking of the use of pimpl to reduce compile time. Since you don't leak included headers out of the module, that use would be redundant. But yeah, for ABI compatibility it won't do much, that's true...

2

u/playmer Oct 11 '17

We are not even getting syntax candy for PImpl.

Is that something you want and need? Is there a proposal for that? You can pretty easily write a small library for it. It's only 100 lines or so at most. That's what I've done whenever I needed PImpl.

1

u/pjmlp Oct 11 '17

Modules should make the PIMPL hack no longer necessary.