"Nevertheless, this is still a few order of magnitude better than C++ templating."<p>Uh... no. On a personal level, I have always found that almost any type of preprocessor magic, especially re-#including with a different set of parameters in effect is a recipe for disaster.<p>Any use of the pre-processor seems to have a serious impact on the build-system (tracking parallel variants), the IDE (color, intellisense or auto-completion), the debugger, and apparently any tool that operates at the meta-level.<p>On the other hand, IDEs and debuggers often also have problems with C++ templates as well.
Am I crazy to think that the result has generally been better with templates?<p>I think we would better off without any of this. We should: - discard the preprocessor,
- expanding and tightening control on templating), and
- migrating towards more conventional module import methods, such as <a href="http://clang.llvm.org/docs/Modules.html" rel="nofollow">http://clang.llvm.org/docs/Modules.html</a> (instead of #include, unless you can fix IWYU).