Should unreachable code be considered an error?

Timon Gehr timon.gehr at gmx.ch
Thu Aug 18 05:49:50 PDT 2011


On 08/18/2011 02:38 PM, Bernard Helyer wrote:
> Faramir on the Ars forums makes an excellent point:
>
> "With the c preprocessor, both theoretically and as it is used in
> practice, you can easily get dead code in certain compile paths that is
> live in others."
>
> I think template mixins can achieve the same sort of shenanigans. I think
> warning it is.

You mean string mixins?
As string mixins are so much more expressive than C macros, one should 
actually almost never get trivial dead code in well designed string mixins.


More information about the Digitalmars-d mailing list