by astrodust · 9y ago · 0 comments
C has relatively simple header files, they usually contain structs, function signatures, and a bunch of macros. They're easy to parse and apply by comparison, plus don't tend to be as deeply nested.
If C++ ever adopts the Pascal-style "module" extensions that have been kicking around in various proposals compile times could shrink by several orders of magnitude.
I'm skeptical. Modules don't avoid the need for template instantiation.
The motivation for modules in C++ is similar to that of developing a Binary AST for Javascript, discussed on HN recently.
Really? And I thought that this is why C and C++ headers are typically wrapped in #ifndef-#define-#endif block, so they only produce whitespace after preprocessing on second inclusion.
That is, including a, b, c is not necessarily the same as a, c, b or b, a, c. This is not true with proper modules, they're order invariant, and as such you can make a ton of optimiztions.
Turbo C++ was never as "turbo" as Turbo Pascal.
You can get Visual C++ with support for them.
clang has support, but the old style ones
Currently they are already a TS targeted for C++20.