version: multiple conditions

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 16 18:04:32 PDT 2015


"Walter Bright"  wrote in message news:mloslo$1o7v$1 at digitalmars.com...

> I have yet to see a single case of "needing" boolean versions that could 
> not be refactored into something much more readable and maintainable that 
> did not use such.
>
> Over time, I've gotten rid of most of that stuff from the dmd source code, 
> and the result has been quite pleasing.

The numerous remaining cases in dmd are why ddmd uses static if instead of 
version.  It's almost always easier to just use the more powerful 'static 
if' than to refactor the code to use D's crippled 'version'.  Keeping this 
feature simple and limited just pushes the complexity into user code. 



More information about the Digitalmars-d mailing list