<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 11, 2016, at 7:27 AM, Rob Mayoff &lt;<a href="mailto:mayoff@dqd.com" class="">mayoff@dqd.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Just to be clear, under your proposal, what does the following program<br class="">print? Can you make an argument in favor of your interpretation?<br class=""><br class=""> &nbsp;&nbsp;&nbsp;var x = 1<br class=""> &nbsp;&nbsp;&nbsp;switch x {<br class=""> &nbsp;&nbsp;&nbsp;case 1:<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print("one")<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = 2<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue<br class=""> &nbsp;&nbsp;&nbsp;case 2:<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print("two")<br class=""> &nbsp;&nbsp;&nbsp;default:<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break<br class=""> &nbsp;&nbsp;&nbsp;}<br class=""></div></div></blockquote></div><br class=""><div class="">The switch statement is defined as:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">switch-statement → switch expression {switch-cases*}</font></div><div class=""><br class=""></div><div class="">I'd imagine this means the expression is evaluated once, e.g.:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span><span style="font-variant-ligatures: no-common-ligatures" class=""> + </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">3</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span><span style="font-variant-ligatures: no-common-ligatures" class="">"Five!"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">default</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures" class="">break</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div></div><div class=""><br class=""></div><div class="">So I'm more likely to expect "one" than "one"/"two". &nbsp;I would defer this question&nbsp;</div><div class="">to the core team for a better answer.</div></div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div></body></html>