every proposal for C/C++ modules feels like it's by someone who has not used a working module system and doesn't believe it's truly possible to create
every proposal for C/C++ modules feels like it's by someone who has not used a working module system and doesn't believe it's truly possible to create
I almost feel like they should give up. IMO Rust and Zig have made C/C++ a legacy language. Except in some specific areas where Rust doesn't have mature libraries (GUIs & games mostly) you'd be silly to start a new project in C++.
Migrating existing C++ projects to modules likely isn't worth the enormous effort, and the days of starting new C++ projects are numbered... so why bother?
- scientific/numerical computing (super mature)
- domain-specific high performance computing (C++ is for better or worse extremely flexible)
- weird CUDA use cases (feels very native in C++)
- game dev as you mention
- probably much much more
C++ to me feels more like a meta-language where you go off to build your own kind of high performance DSL. Rust is much more rigid, which is probably a good thing for many “standard” use cases. But I’m sure there will always be a very very long tail of these niche projects where the flexibility comes in handy.
This Reddit comment captures my reasons pretty well: https://www.reddit.com/r/rust/comments/1arys3z/comment/kqoak...
Additionally while they keep being built on top of C++ compiler infrastructure, C++ isn't going away.
Plenty of industry are stuck on C++ < ISO C++20, just like they are stuck in Python 2, Java 8, .NET Framework 4.x,...
Industry moves at snail pace adopting new languages, or versions thereof.
better to lose a few libraries to modernization than the whole language community