No need for version expression is a lie

Walter Bright newshound2 at digitalmars.com
Tue Aug 22 01:46:17 UTC 2023


On 8/21/2023 2:04 PM, Jonathan M Davis wrote:
> That being said, fortunately, most D code doesn't have to worry about
> version statements much, because druntime hides most of that mess. There are
> other libraries that wrap C code and/or are more low-level in nature which
> have to do a fair bit of versioning with code, but most D code is able to be
> version-agnostic, which fortunately keeps the issues with how how version
> statements work to a minimum.

Thanks for your thoughts on this. One more meta thing about versioning is it is 
better to remove all the version conditionals from the core parts of the program.

I.e. abstract away what the versioning is trying to represent, and put those 
abstractions in a separate module.

Over time I've gotten better at this, and it makes the code much more pleasing 
to read.

I'll be talking about this and similar things at DConf.



More information about the Digitalmars-d mailing list