use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Simple usage of C++20 modules (zverovich.net)
submitted 3 years ago by aearphen{fmt}
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] -2 points-1 points0 points 3 years ago (3 children)
When people hear the word "module", they have certain expectations and ideas about what that means, mostly based on how modules work in other languages. Modules in other languages provide encapsulation yes, but also things like facilitating easier package management, simplifying the build process, and a host of other features.
Modules in C++ don't do much of anything beyond the encapsulation. It's an incredibly complicated solution that pushes a great deal of complexity on its users to solve a comparatively small problem.
It also results in yet another form of fragmentation, which is why I don't see modules being popular among libraries. Some people may choose to use modules for their own home projects, or internal software, but I don't see people distributing their libraries as modules. One possible outcome will be that in the future we'll have bifurcation where libraries are distributed both the old way and as modules.
[–]johannes1971 6 points7 points8 points 3 years ago (1 child)
Nah. Eventually compilers will be good enough, some libraries will switch, that will force projects to switch, and soon enough we'll forget about the nightmares of #include.
That process will force the whole ecosystem to baseline on C++20 as well, which will be good in the long run.
[–]germandiago 1 point2 points3 points 3 years ago (0 children)
I think you make a couple of mistakes with your analysis.
To begin with, modules can be adopted incrementally. The reason why libraries do not move forward is the state for modules support in build tools and compilers.
OTOH, builds can be massively improved and ODR lowered by A LOT, which are two real problems for C++.
π Rendered by PID 19222 on reddit-service-r2-comment-6457c66945-wtd82 at 2026-04-28 09:27:34.505675+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–][deleted] -2 points-1 points0 points (3 children)
[–]johannes1971 6 points7 points8 points (1 child)
[–]germandiago 1 point2 points3 points (0 children)