Why version() ?

Walter Bright newshound1 at digitalmars.com
Tue Feb 10 16:18:04 PST 2009


Denis Koroskin wrote:
> Why did you catch that controversial !Linux example? Just imagine it is 
> !HasFeatureX:
> 
> version(!HasFeatureX) {
>   ...
> }
> 
> is so much more intuitive than
> 
> version (HasFeatureX) {
> } else {
>   ...
> }


This is to combat the pernicious problem of having features that 
subtract code <g>.



More information about the Digitalmars-d mailing list