No need for version expression is a lie

John Colvin john.loughran.colvin at gmail.com
Thu Aug 24 16:26:10 UTC 2023


On Wednesday, 23 August 2023 at 17:24:24 UTC, Adam D Ruppe wrote:
>
>> 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.
>
> This is *significantly* better than using D's failed `version` 
> specifier.

We have the ability to declare information (`enum`s and so on) & 
branch on it at compile time (`static if`), we have a package & 
module system to handle who can and does read that data. Beyond 
that, it's the author & build system’s problem imo.

I get the problem that `version` tries to solve, but I reckon if 
it didn’t already exist then it wouldn’t get added now.


More information about the Digitalmars-d mailing list