My understanding is it was discussed and after some hot debate, rejected. The preprocessor is still the foremost C++ language mechanism for handling platform differences, there's little desire to change that.
It is entirely reasonable to have imports which resolve to platform specific modules. Once you allow that and accept you need the compiler to handle scanning, banning the preprocessor elsewhere is mostly pointless.
So for example, some debate went into the validity of:
#define mod Bar
#ifdef USE_FOO
#undef mod
#define mod Foo
#endif
import mod;
But once you have the full preprocessor, there's no reason to ban this. And it's totally valid today:
Good point, I think my bias toward disliking the preprocessor has given me the secondary goal of removing all cases where it is required so we can stop using it entirely. But I agree, this should not limit others that wish to continue to use it.
View all comments
Show parent comment
1
u/mwasplund soup Mar 10 '26
How crazy of an idea would it be to say the global module fragment can not have
#if*directives?