One of the quite exciting features of Clang that I stumbled upon today is support for modules.
I've always found the relationship between C and the preprocessor a little weird. It feels like it was both a fantastic and terrible idea at the same time. On one hand it gives you a lot of flexibility for compile-time configuration or macros, on the other hand it feels like it's filling in for deficiencies in the language. C++ already goes a long way to eliminating cases where you need macros, but one of the most common cases is how to do modular programming.
The Clang extensions (which I believe is tracking the C++ module proposal) solve both the performance issues of headers, give a cleaner boundary between components of software and give a nice way to handle visibility. Going to have to try this out this weekend.
http://clang.llvm.org/docs/Modules.html
I've always found the relationship between C and the preprocessor a little weird. It feels like it was both a fantastic and terrible idea at the same time. On one hand it gives you a lot of flexibility for compile-time configuration or macros, on the other hand it feels like it's filling in for deficiencies in the language. C++ already goes a long way to eliminating cases where you need macros, but one of the most common cases is how to do modular programming.
The Clang extensions (which I believe is tracking the C++ module proposal) solve both the performance issues of headers, give a cleaner boundary between components of software and give a nice way to handle visibility. Going to have to try this out this weekend.
http://clang.llvm.org/docs/Modules.html