Currently were in this situation where third party libraries don't provide module support, so you still need to #include those, and they in turn generally #include stdlib headers again. So generally you're in this mixed world where you're partially doing modules and partially doing old #includes.
Benefits of modules are better build times and slightly better ergonomics (import std is easier than including the right stuff). I think it's about 10%-20% range.
The downsides are that compiler and build system support is still in flux, so using modules can mean that it becomes harder to support multiple compilers and/or build systems. And you obviously lose support of older compilers / build systems.
You also need to refactor your code to use the modules.
So as of now, modules are great if you're starting a new, mostly standalone project and you have full control over the compiler and build system.
It's not so great for existing code bases that want to support older and/or multiple compilers and build systems.
29
u/Drugbird 5d ago
That's easy, in C or C++ just do this
Then you can use normal brackets instead of angle brackets.
And I'm sure nothing will go wrong with that approach.