Live data from Hacker News

C++ Modules Are Here to Stay

faresbakhit.github.io

11–20 of 143 posts

Re: C++ Modules Are Here to Stay

#11
post #4

Can someone using modules chime in on whether they’ve seen build times improve?

import std; is an order of magnitude faster than using the STL individually, if that's evidence enough for you. It's faster than #include alone.

Chuanqi says "The data I have obtained from practice ranges from 25% to 45%, excluding the build time of third-party libraries, including the standard library."[1]

[1]: https://chuanqixu9.github.io/c++/2025/08/14/C++20-Modules.en...

Re: C++ Modules Are Here to Stay

#13
post #5

why use modules if PCH on your diagram is not much worse in compile times?

Macro hygiene, static initialization ordering, control over symbol export (no more detail namespaces), slightly higher ceiling for compile-time and optimization performance.

If these aren't compelling, there's no real reason.

Re: C++ Modules Are Here to Stay

#14
post #8

https://arewemodulesyet.org/ gives you an overview which libraries already provide a module version.

Wow, the way this data is presented is hilarious.

Log scale: Less than 3% done, but it looks like over 50%.

Estimated completion date: 10 March 2195

It would be less funny if they used an exponential model for the completion date to match the log scale.

Re: C++ Modules Are Here to Stay

#15

I can’t deploy C++ modules to any of the hardware I use in the shop. Probably won’t change in the near-to-mid future. It seems likely I’ll have to move away from C++, or perhaps more accurately it’s moving away from me.

If you tools are not updated that isn't the fault of C++. You will feel the same about Rust when forced to used a 15 year old version too (as I write this Rust 1.0 is only 10 years old). Don't whine to me about these problems, whine to your vendors until they give you the new stuff.

Re: C++ Modules Are Here to Stay

#17
post #4

Can someone using modules chime in on whether they’ve seen build times improve?

import std; is an order of magnitude faster than using the STL individually, if that's evidence enough for you. It's faster than #include alone. Chuanqi says "The data I have obtained from practice ranges from 25% to 45%, excluding the build time of third-party libraries, including the standard library."[1] [1]: https://chuanqixu9.github.io/c++/2025/08/14/C++20-Modules.en...

Yeah, but now compare this to pre-compiled headers. Maybe we should be happy with getting a standard way to have pre-compiled std headers, but now my build has a "scanning" phase which takes up some time.

Re: C++ Modules Are Here to Stay

#19
From the outside looking in, this all feels like too little too late. Big tech has decided on Rust for future infrastructure projects. C++ will get QoL improvements… one day and the committees seem unable to keep everyone happy or disappoint one stake holder. C++ will be around forever, but will it be primarily legacy?
Post reply on HN