From what I understand about having to include . Is that the compiler is required by the standard to only import the symbols from a header very specific to what the module uses from that header. So when then using the std::print() with a locale, it will fail, because the specific locale symbol was not imported/exported by the module. It gets more insane when you know that operator requires . So if you use a type from a module and compare with operator
tbf, unlike pretty much every other feature which only requires the compiler to do work, this one requires a multitude of projects to work together at solving something especially because the more talks I hear about modules the more I have the feeling that the committee decided to not specify a LOT of stuff so the implementers are still figuring some parts of it out now
Maybe it is just me. But if I declare an inline variable, I expect due to ODR it will only appear once in the application, even if it is declared in a module interface.
I can definitely understand it if full module support will take a while because of the entire toolchain, build system, packaging and static analysis being affected. All I’d really want from modules to start with is to be able to import the standard library without concern inside production code. I think we’re not too far off of that, if I understand well? C++23 adds "import std;" but I heard that for now there were some pitfalls still when mixing imports and includes of the standard library?
Everyway I look at it, modules just seem like unnecessary complexity wrapped up as a shiny toy. All so users can continue sloppy organization of their files. The engineering effort could be put into much more useful features with higher return on the investment.
What kind of features would you put into that category? Maybe modules are not ideal, but moving away from includes is something C++ should have done 20 years ago. It's high time it did
I've been waiting three years for someone to talk about distributing module-based C++ libraries. Thank you so much Luis Caro Campos!
thanks for suffering report, very informative
From what I understand about having to include . Is that the compiler is required by the standard to only import the symbols from a header very specific to what the module uses from that header. So when then using the std::print() with a locale, it will fail, because the specific locale symbol was not imported/exported by the module.
It gets more insane when you know that operator requires . So if you use a type from a module and compare with operator
In 2023, still a c++20 feature not fully supported by compilers and tools! This is a bummer.
tbf, unlike pretty much every other feature which only requires the compiler to do work, this one requires a multitude of projects to work together at solving something
especially because the more talks I hear about modules the more I have the feeling that the committee decided to not specify a LOT of stuff so the implementers are still figuring some parts of it out now
Maybe it is just me. But if I declare an inline variable, I expect due to ODR it will only appear once in the application, even if it is declared in a module interface.
What has changed about modules since this talk was recorded? CMake 3.28 is out but that's all I know.
So we must wait another... 10 years ? for modules to be ready 😂
I can definitely understand it if full module support will take a while because of the entire toolchain, build system, packaging and static analysis being affected. All I’d really want from modules to start with is to be able to import the standard library without concern inside production code. I think we’re not too far off of that, if I understand well? C++23 adds "import std;" but I heard that for now there were some pitfalls still when mixing imports and includes of the standard library?
Everyway I look at it, modules just seem like unnecessary complexity wrapped up as a shiny toy. All so users can continue sloppy organization of their files. The engineering effort could be put into much more useful features with higher return on the investment.
What kind of features would you put into that category? Maybe modules are not ideal, but moving away from includes is something C++ should have done 20 years ago. It's high time it did