Good examples of version() algebra in real code

Walter Bright newshound2 at digitalmars.com
Mon May 22 18:08:32 UTC 2023


On 5/22/2023 1:49 AM, Richard (Rikki) Andrew Cattermole wrote:
> If you want to be principled about it, one way to consider it is that not having 
> an else branch (even if empty) should be an error. Because you clearly didn't 
> think about the multiplicative issues of the versions.

Sometimes, something really is a Windows-only thang. But when it's a Windows or 
OSX thing, enumeration of all the platforms is the way to go.

 > An option could be to use comma instead of || to handle or'ing.

That goes to version hell, too. Some of this remains in the backend, and it 
isn't pretty.


More information about the Digitalmars-d mailing list