<story><title>How to Get Fired Using Switch Statements and Statement Expressions (2016)</title><url>https://blog.robertelder.org/switch-statements-statement-expressions/</url></story><parent_chain></parent_chain><comment><author>hinkley</author><text>&lt;p&gt;&lt;pre&gt;&lt;code&gt;    for(i = 0; i &amp;lt; 10; i++){
        case 1:{
&lt;/code&gt;&lt;/pre&gt;
I just threw up a little in my mouth.&lt;p&gt;All these years I didn&amp;#x27;t know such a monstrous thing was legal in C code.  Is it possible to make amendments to the Geneva Convention, and if so, who should I call?</text></comment>
<story><title>How to Get Fired Using Switch Statements and Statement Expressions (2016)</title><url>https://blog.robertelder.org/switch-statements-statement-expressions/</url></story><parent_chain></parent_chain><comment><author>georgeecollins</author><text>This is a great example of the dangerous syntax of Switch statements in C.  However, I do think programmers should not reflexively avoid Switch&amp;#x2F;Case statements in their code.  Polymorphism is often a way of writing switch statements that looks very clean, but hides some of the same spooky branching behavior.  The nice thing about a switch&amp;#x2F;branch is you can see where the code might go from the text in front of you.</text></comment>