About switch case statements...

Walter Bright newshound1 at digitalmars.com
Mon Nov 16 13:14:19 PST 2009


Don wrote:
> That's not fall-through, one case is *inside* the 'if' clause of another 
> one!! Wow. Do you really want to encourage that sort of thing?

I think it's more the #if that obfuscates the code. After long 
experience with #if, I really don't like it, which is why I adamantly 
resist having fine-grained conditional compilation in D.

The optimizer/code generator has a lot of awful #if's in them, generally 
as a result of it being hackishly ported to other platforms.

I'm not going to stand up and say the optimizer/code gen is a fine 
example of elegant software (it isn't), just that it *works* and is 
remarkably free of bugs.



More information about the Digitalmars-d mailing list