Re:Zig Devlog: Self-Hosted x86 Back End Is Now Default in De...
by pjmlp on Monday June 09, 2025 @05:46AM
(#44222785)
As big fan of C++ modules (see my github), we are decades away of widespread adoption, unfortunately.
See regular discussions on C++ reddit, regarding state of modules support across the ecosystem.
Notice that this is an extreme example since we're importing the whole standard library and is actually discouraged [^1]. Instead you can get through the day with just these flags: `-stdlib=libc++ -fimplicit-modules -fimplicit-module-maps` and of course -std=c++20 or later, no extra files/commands required! but you are only restricted to doing import <vector>; and such, no import std.
[^1]: non-standard headers like `bits/stdc++.h` which does the same thing (#including the whole standard library) is what is actually discouraged because a. non-standard and b. compile-times, but I can see `import std` solving these two and being encouraged once it's widely available!