Hacker News new | past | comments | ask | show | jobs | submit login

C++20 has modules, which replace header files completely (unless you use old libraries which aren't available as modules yet). Compiler support is there, but unfortunately IDEs are lagging. If you use modules with Visual Studio, say goodbye to IntelliSense. Maybe they'll iron out the bugs in a couple years...



C++20 that is not complete in 2025. I don’t know how C++ developers can work in this with a straight face.


You probably have to think this way: Anything added to C++ will only get to be used in for real for real in 10 years minimum.


They needed the most powerful, most flexible module system ever, so it might take decades to really become useable. Adoption has been painfully slow so far, it's insane complexity really doesn't help.


Wow, that's ridiculous.

I wonder if Xcode does any better with them. Now that would be something.


C++ has modules for small values of "modules": https://arewemodulesyet.org

It's a bit tongue in cheek but: "Are we modules yet? Nope. ... Estimated finish by: Wed Sep 20 2541"


You can use modules to structure your own codebase. No more need to write headers and think about how to structure your code in terms of compilation units. But yeah, your link shows that practically none of the popular libraries (except STL) can be imported as modules today.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: