No need for version expression is a lie

Walter Bright newshound2 at digitalmars.com
Wed Aug 23 17:09:09 UTC 2023


On 8/23/2023 5:28 AM, Adam D Ruppe wrote:
> Except the ones specified on the command line, which are irredeemably superglobal.

That's deliberate, because the Bob and Carol versions should not co-exist in the 
same executable. You can always create a BobAndCarol version for those modules 
that have a foot in both versions.

C's -D, -U switches and #define/#undef system is infinitely adjustable, and 
programmers inevitably take full advantage of that to create an incomprehensible 
soup.

You can also create a config.d file with a list of enum declarations in them, 
import that, and use whatever algebra you want with static if. I recommend 
finding a way to use versions instead.


More information about the Digitalmars-d mailing list