4 ms·
Cool that real modules are now official. Preprocessor textual inclusion should have been left behind in the previous century!
by frou_dh 6y ago
Cool that real modules are now official. Preprocessor textual inclusion should have been left behind in the previous century!
- gmueckl 6y agoThe preprocessor is not gone. It still exists in the context of modules. Figuring out the details of that interaction has been a major issue when defining modules and the result is quite complex. I doubt that we will see clean modules that are free of preprocessor shenanigans, especially when writing any non-trivial portable library. I am no prophet, but I currently assume that unless we get hygienic module friendly macros and better conditional compilation on a syntactic level than dumb textual #ifdef, modules will only end up adding complexity in practice.
- gpderetta 6y agoThe biggest reason that macros are not going away is backward compatibility (a very important reason of course). Adding hygenic macros or "module friendly" macros would not help one bit with that. Also I belive that macros do not escape modules by default. That's a huge improvement.