Version block "conditions" with logical operators

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed May 11 14:00:28 PDT 2016


On 5/11/2016 1:42 PM, John Colvin wrote:
> I'm convinced that you're argument is reasonable if version is only for things
> like platforms, but it's used for a lot of other stuff e.g.
> version(PrintSomeExtraInfo) or version(CacheSomeStuffForPerformance). Do you
> think the same principle applies there?

Yes, I do.

   https://github.com/dlang/dmd/pull/5767

I've also seen very good programmers find 'absolutely must have' uses for static 
if, used them, and caused bugs due to the tangled up nature of it. I had to go 
in and fix it.

It takes a while to change one's thinking from the C++ #if expressions, but the 
result is worth it.


More information about the Digitalmars-d mailing list