No need for version expression is a lie

Walter Bright newshound2 at digitalmars.com
Thu Aug 24 21:37:54 UTC 2023


On 8/24/2023 9:26 AM, John Colvin wrote:
> 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.


At one point, druntime was largely converted to using enums and static if, to 
implement version algebra. It inevitably increased in complexity until nobody 
understood what was happening (due to circular imports).

It got dumped in my lap. I converted it all back to versions, and it's been 
trouble free ever since.

People can do as they like, but I prefer to stick with stupid simple version :-)


More information about the Digitalmars-d mailing list