Good examples of version() algebra in real code
Guillaume Piolat
first.last at spam.org
Mon May 22 14:21:15 UTC 2023
On Monday, 22 May 2023 at 12:41:24 UTC, Steven Schveighoffer
wrote:
>
> One of the largest problems with this scheme is it needs to be
> repeated in every module that uses e.g. `version(Darwin)`.
>
> -Steve
Yes, maybe add those 3 common version identifiers directly, which
doesn't change the design of `version`.
Also maybe Hipreme's idea avoids the #ifdef hell problem
(abondance of names and double negations).
> Maybe if there was a construct for allowing **only version
> declaration** with boolean operators like:
`version RelaxedSystems = version(Windows && linux && !OSX)` (it
would not be global as the `version` is right now. i.e: not allow
this syntax to be used standalone.
More information about the Digitalmars-d
mailing list