How to Get Fired Using Switch Statements and Statement Expressions (2016)
&gt; Statement expressions ... allow you to embed a compound statement within an expression.  The value returned by the last expression is the value returned by the entire statement expression.<p>&gt; You might ask &quot;Why would you ever want to do such a thing?&quot;<p>I just want to mention that expressions are crucial in functional programming, where even an if-statement returns a value. Statements that don&#x27;t return a value don&#x27;t make any sense in a pure functional world, because they aren&#x27;t functions.<p>So hopefully that answers the &quot;why?&quot; question. (Of course, abusing expressions in switch statements, as in this article, isn&#x27;t something you can do in FP.)