version vs. static if

Walter Bright newshound2 at digitalmars.com
Fri Sep 23 13:31:18 PDT 2011


On 9/23/2011 1:09 PM, Jonathan M Davis wrote:
> Yes, we technically _could_ get rid of version and do it all with static ifs,
> but it wouldn't be as clean IMHO.

Right. It's the same reason for the existence of the debug conditionals. Such 
could be done with version or with static if, but experience with C is that 
every group invents their own convention for doing conditional debug code, all 
incompatible.

Having it wired in the language tends to standardize it and make it interoperable.


More information about the Digitalmars-d mailing list