logoalt Hacker News

forrestthewoodsyesterday at 6:44 PM4 repliesview on HN

No. Modules are a failed idea. Really really hard for me to see them becoming mainstream at this point.


Replies

m-schuetzyesterday at 6:58 PM

The idea is great, the execution is terrible. In JS, modules were instantly popular because they were easy to use, added a lot of benefit, and support in browsers and the ecoysystem was fairly good after a couple of years. In C++, support is still bad, 6 years after they were introduced.

show 1 reply
Xraider72yesterday at 7:01 PM

No idea if modules themselves are failed or no, but if c++ wants to keep fighting for developer mindshare, it must make something resembling modules work and figure out package management.

yes you have CPM, vcpkg and conan, but those are not really standard and there is friction involved in getting it work.

show 2 replies
AyanamiKaineyesterday at 7:59 PM

Can you explain why you think modules are a failed idea? Because not that many use them right now?

Personally I use them in new projects using XMake and it just works.

show 2 replies
hrmtst93837yesterday at 7:49 PM

"Failed idea" gives modules too much credit. Outside old codebases, almost no one outside C++ diehards have the patience for the build and tooling circuss they create, and if you need fast iteration plus sane integration with existing deps, modules are like trading your shoes for roller skates in a gravel lot. Adopting them now feels like volunteering to do tax forms in assembbly.