<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="">Made a mistake on first example underscore should not have been quoted:<div class=""><br class=""></div><div class=""><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let&nbsp;</span><span style="font-family: Menlo;" class="">resultString</span><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">&nbsp;=</span><span style="font-family: Menlo;" class="">&nbsp;someCharacter ?(&nbsp;</span><br class="">&nbsp; &nbsp;<font face="Menlo" class="">"a"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"e"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"i"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"o"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class=""><font face="Menlo" class="">“u</font></font><font color="#d12f1b" face="Menlo" class="">”</font><font face="Menlo" class="">:&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"</span><font face="Menlo" class="">\</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">(</span><font face="Menlo" class="">someCharacter</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">) is a vowel"</span><br class=""><font face="Menlo" class="">&nbsp;&nbsp;</font><font color="#d12f1b" class="" style="font-family: Menlo;">"b"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"c"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"d"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"f"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"g"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"h"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"j"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"k"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class="" style="font-family: Menlo;">"l"</font><span class="" style="font-family: Menlo;">,&nbsp;</span><font color="#d12f1b" class=""><font face="Menlo" class="">“m</font></font><font face="Menlo" class=""><font color="#d12f1b" class="">”</font>,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"n"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"p"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"q"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"r"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"s"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"t"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"v"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"w"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"x"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"y"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"z”</span><font face="Menlo" class="">:</font><br class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">\</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">(</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">someCharacter</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">) is a consonant"</span><br class=""><span style="color: rgb(187, 44, 162); font-family: Menlo;" class="">&nbsp; _:&nbsp;</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"</span><span class="" style="color: rgb(187, 44, 162); font-family: Menlo;">\</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">(</span><span class="" style="color: rgb(187, 44, 162); font-family: Menlo;">someCharacter</span><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">) is not a vowel or a consonant"</span><br class=""><span style="font-family: Menlo;" class="">)</span><br class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class=""><div class="" style="margin: 0px; line-height: normal; font-family: Menlo;">print(resultString)</div></div></div></div><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class=""><div class="" style="margin: 0px; line-height: normal; font-family: Menlo;"><br class=""></div></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Jan 6, 2016, at 2:22 PM, Paul Ossenbruggen &lt;<a href="mailto:possen@gmail.com" class="">possen@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Just to try out some other examples from the Swift book as you can see it gets rid of a lot of boiler plate and duplicated code for almost all of the examples. I think it is just as readable if not more readable and very Swift like. It also leaves more room on the line so you can avoid multiline cases more often. In the book the examples often use “var” when “let” would be preferred.&nbsp;<div class=""><br class=""></div><div class="">This:<br class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span> someCharacter {</div><div style="margin: 0px; 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="" class=""> </span>"a"<span style="" class="">, </span>"e"<span style="" class="">, </span>"i"<span style="" class="">, </span>"o"<span style="" class="">, </span>"u"<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; print(<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>someCharacter<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">) is a vowel"</span>)</div><div style="margin: 0px; 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="" class=""> </span>"b"<span style="" class="">, </span>"c"<span style="" class="">, </span>"d"<span style="" class="">, </span>"f"<span style="" class="">, </span>"g"<span style="" class="">, </span>"h"<span style="" class="">, </span>"j"<span style="" class="">, </span>"k"<span style="" class="">, </span>"l"<span style="" class="">, </span>"m"<span style="" class="">,</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class="">"n"<span style="" class="">, </span>"p"<span style="" class="">, </span>"q"<span style="" class="">, </span>"r"<span style="" class="">, </span>"s"<span style="" class="">, </span>"t"<span style="" class="">, </span>"v"<span style="" class="">, </span>"w"<span style="" class="">, </span>"x"<span style="" class="">, </span>"y"<span style="" class="">, </span>"z"<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; print(<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>someCharacter<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">) is a consonant"</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">default<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; print(</span>"<span style="" class="">\</span>(<span style="" class="">someCharacter</span>) is not a vowel or a consonant"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">}</div><div class=""><br class=""></div><div class="">Becomes:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let </span>resultString<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class=""> =</span>&nbsp;someCharacter ?(&nbsp;</div><div style="margin: 0px; line-height: normal;" class="">&nbsp; &nbsp;<font face="Menlo" class="">"a"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"e"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"i"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"o"</font><span style="font-family: Menlo;" class="">,&nbsp;</span><font color="#d12f1b" class=""><font face="Menlo" class="">“u</font></font><font color="#d12f1b" face="Menlo" class="">”</font><font face="Menlo" class="">:&nbsp;</font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"</span><font face="Menlo" class="">\</font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">(</span><font face="Menlo" class="">someCharacter</font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">) is a vowel"</span></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class="">&nbsp;&nbsp;</font><font color="#d12f1b" style="font-family: Menlo;" class="">"b"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"c"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"d"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"f"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"g"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"h"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"j"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"k"</font><span style="font-family: Menlo;" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"l"</font><span style="font-family: Menlo;" class="">,&nbsp;</span><font color="#d12f1b" class=""><font face="Menlo" class="">“m</font></font><font face="Menlo" class=""><font color="#d12f1b" class="">”</font>,&nbsp;</font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"n"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"p"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"q"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"r"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"s"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"t"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"v"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"w"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"x"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"y"</span><font face="Menlo" class="">, </font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"z”</span><font face="Menlo" class="">:</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;</font><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">"</span><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">\</span><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">(</span><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">someCharacter</span><span style="font-family: Menlo; color: rgb(209, 47, 27);" class="">) is a consonant"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">&nbsp; “_”:&nbsp;<span style="color: rgb(209, 47, 27);" class="">"</span><span style="" class="">\</span><span style="color: rgb(209, 47, 27);" class="">(</span><span style="" class="">someCharacter</span><span style="color: rgb(209, 47, 27);" class="">) is not a vowel or a consonant"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">)</div></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">print(resultString)</div><div class=""><br class=""></div><div class="">This:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> approximateCount = <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">62</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> countedThings = </span>"moons orbiting Saturn"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> naturalCount: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">String</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span><span style="" class=""> </span>approximateCount<span style="" class=""> {</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">case<span style="" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>naturalCount<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"no"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>..&lt;<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span>:</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>naturalCount<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"a few"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span>..&lt;<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">12</span>:</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>naturalCount<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"several"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">12</span>..&lt;<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">100</span>:</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>naturalCount<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"dozens of"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(39, 42, 216);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span><span style="" class=""> </span>100<span style="" class="">..&lt;</span>1000<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">naturalCount</span><span style="" class=""> = </span>"hundreds of"</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">default<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>naturalCount<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"many"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">}</div></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">Becomes:</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> approximateCount = <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">62</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> countedThings = </span>"moons orbiting Saturn"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let&nbsp;</span>naturalCount<span style="color: rgb(79, 129, 135);" class="">&nbsp;=</span>&nbsp;<span style="color: rgb(79, 129, 135);" class="">approximateCount</span>&nbsp;?(</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>0</span><span style="" class="">:</span><span style="" class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="color: rgb(209, 47, 27);" class="">"no"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>..&lt;<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span>:&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: rgb(209, 47, 27);" class="">"a few"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>5..&lt;<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">12</span>:&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: rgb(209, 47, 27);" class="">"several"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">12</span>..&lt;<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">100</span>:<span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: rgb(209, 47, 27);" class="">"dozens of"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><font color="#272ad8" class="">100</font><span style="" class="">..&lt;</span><font color="#272ad8" class="">1000</font><span style="" class="">:</span>&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: rgb(209, 47, 27);" class="">"hundreds of"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span>_:&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: rgb(209, 47, 27);" class="">"many"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">)</div></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"There are </span><span style="" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>naturalCount<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">) </span><span style="" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>countedThings<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)."</span><span style="" class="">)</span></div></div><div class=""><span style="" class=""><br class=""></span></div><div class=""><span style="" class="">This:</span></div><div class=""><span style="" class=""><br class=""></span></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> anotherPoint = (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span><span style="" class=""> </span>anotherPoint<span style="" class=""> {</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> x, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"on the x-axis with an x value of <span style="" class="">\</span>(<span style="" class="">x</span>)"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> y):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"on the y-axis with a y value of <span style="" class="">\</span>(<span style="" class="">y</span>)"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> (x, y):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"somewhere else at (<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>))"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">}</div></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">Becomes:</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> anotherPoint = (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>)</div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> resultString = <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">anotherPoint</span>&nbsp;?(</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; (</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> x, </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="" class="">): &nbsp; </span>"on the x-axis with an x value of <span style="" class="">\</span>(<span style="" class="">x</span>)"</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span>(<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> y): &nbsp; </span>"on the y-axis with a y value of <span style="" class="">\</span>(<span style="" class="">y</span>)"</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> (x, y): &nbsp; </span>"somewhere else at (<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>))"</div><div style="margin: 0px; line-height: normal;" class="">)</div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="" class="">print(</span>resultString<span style="" class="">)</span></div></div><div class=""><span style="" class=""><br class=""></span></div><div class=""><span style="" class="">This:</span></div><div class=""><span style="" class=""><br class=""></span></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> yetAnotherPoint = (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>, -<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span><span style="" class=""> </span>yetAnotherPoint<span style="" class=""> {</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> (x, y) <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">where</span> x == y:</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"(<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>)) is on the line x == y"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> (x, y) <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">where</span> x == -y:</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"(<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>)) is on the line x == -y"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> (x, y):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"(<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>)) is just some arbitrary point"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">}</div><div style="margin: 0px; line-height: normal; font-family: Menlo; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo; min-height: 14px;" class="">Becomes:</div><div style="margin: 0px; line-height: normal; font-family: Menlo; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> yetAnotherPoint = (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>, -<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> resultString = yetAnotherPoint ?(</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> (x, y) </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">where</span><span style="" class=""> x == y: &nbsp;</span>"(<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>)) is on the line x == y"</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> (x, y) </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">where</span><span style="" class=""> x == -y: </span>"(<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>)) is on the line x == -y"</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> (x, y):<span class="Apple-tab-span" style="white-space:pre">                </span>&nbsp; &nbsp; &nbsp;&nbsp;</span>"(<span style="" class="">\</span>(<span style="" class="">x</span>), <span style="" class="">\</span>(<span style="" class="">y</span>)) is just some arbitrary point"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">)</div></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">print(resultString)</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">This:</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> numberSymbol: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Character</span><span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'PingFang SC'; color: rgb(209, 47, 27);" class="">三</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="" class="">&nbsp; </span>// Simplified Chinese for the number 3</div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> possibleIntegerValue: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Int</span>?</div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span><span style="" class=""> </span>numberSymbol<span style="" class=""> {</span></div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span><span style="" class=""> </span>"1"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">١</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">一</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๑</span>"<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>possibleIntegerValue<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span></div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span><span style="" class=""> </span>"2"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">٢</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">二</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๒</span>"<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>possibleIntegerValue<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span></div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span><span style="" class=""> </span>"3"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">٣</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">三</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๓</span>"<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>possibleIntegerValue<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">3</span></div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span><span style="" class=""> </span>"4"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">٤</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">四</span>"<span style="" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๔</span>"<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; </span>possibleIntegerValue<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4</span></div><div style="margin: 0px; line-height: normal; color: rgb(187, 44, 162);" class="">default<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(187, 44, 162);" class=""><span style="" class="">&nbsp; &nbsp; </span>break</div><div style="margin: 0px; line-height: normal;" class="">}</div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span><span style="" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> integerValue = </span>possibleIntegerValue<span style="" class=""> {</span></div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"The integer value of <span style="" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>) is <span style="" class="">\</span>(<span style="" class="">integerValue</span>)."<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal;" class="">} <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">else</span> {</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"An integer value could not be found for <span style="" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>)."<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal;" class="">}</div><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class="">// prints "The integer value of <span style="line-height: normal; font-family: 'PingFang SC';" class="">三</span> is 3.”</div><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><div style="margin: 0px; line-height: normal; min-height: 14px;" class="">Becomes:</div><div class=""><br class=""></div></div><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> numberSymbol: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Character</span><span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'PingFang SC'; color: rgb(209, 47, 27);" class="">三</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="" class="">&nbsp; </span>// Simplified Chinese for the number 3</div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> possibleIntegerValue:<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Int</span>? =&nbsp;<span style="color: rgb(79, 129, 135);" class="">numberSymbol</span>&nbsp;?(</div><div style="margin: 0px; line-height: normal;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"1"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'Courier New'; color: rgb(209, 47, 27);" class="">١</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'PingFang SC'; color: rgb(209, 47, 27);" class="">一</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: Ayuthaya; color: rgb(209, 47, 27);" class="">๑</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>: <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span></div><div style="margin: 0px; line-height: normal;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"2"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'Courier New'; color: rgb(209, 47, 27);" class="">٢</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'PingFang SC'; color: rgb(209, 47, 27);" class="">二</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: Ayuthaya; color: rgb(209, 47, 27);" class="">๒</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>: <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span></div><div style="margin: 0px; line-height: normal;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"3"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'Courier New'; color: rgb(209, 47, 27);" class="">٣</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'PingFang SC'; color: rgb(209, 47, 27);" class="">三</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: Ayuthaya; color: rgb(209, 47, 27);" class="">๓</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>: <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">3</span></div><div style="margin: 0px; line-height: normal;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"4"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'Courier New'; color: rgb(209, 47, 27);" class="">٤</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: 'PingFang SC'; color: rgb(209, 47, 27);" class="">四</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="line-height: normal; font-family: Ayuthaya; color: rgb(209, 47, 27);" class="">๔</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>: <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4</span></div><div style="margin: 0px; line-height: normal;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">_</span> : <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">nil</span></div><div style="margin: 0px; line-height: normal;" class="">)</div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span><span style="" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="" class=""> integerValue = </span>possibleIntegerValue<span style="" class=""> {</span></div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"The integer value of <span style="" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>) is <span style="" class="">\</span>(<span style="" class="">integerValue</span>)."<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal;" class="">} <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">else</span> {</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"An integer value could not be found for <span style="" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>)."<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal;" class="">}</div></div><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class="">// prints "The integer value of&nbsp;<span style="line-height: normal; font-family: 'PingFang SC';" class="">三</span>&nbsp;is 3.”</div><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><br class=""></div></div><div class="">This last one does not automatically make it an optional, you need to manually put the optional type in, just as ternary does.&nbsp;</div><div class=""><br class=""></div><div class="">The falltrhough examples don’t make sense because you can’t have fallthrough, break or continue statements in expressions, since they single expressions. If you need that, then use a the statement form.&nbsp;</div><div class=""><br class=""></div><div class="">- Paul</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 6, 2016, at 11:03 AM, Paul Ossenbruggen &lt;<a href="mailto:possen@gmail.com" class="">possen@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">To point 1: I agree it needs a new name, I came up with the “demux expression” but maybe there is a better name.&nbsp;</div><div class=""><br class=""></div><div class="">To point 2: Taking a more complex example which uses _ adapted from the swift book. The original&nbsp;</div><div class=""><br class=""></div><div class=""><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">switch</span> somePoint {</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="" class="">(</span>"(0, 0) is at the origin"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">_</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; print(</span>"(<span style="" class="">\</span>(<span style="" class="">somePoint.</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>), 0) is on the x-axis"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">_</span>):</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="" class="">&nbsp; &nbsp; print(</span>"(0, <span style="" class="">\</span>(<span style="" class="">somePoint.</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span>)) is on the y-axis"<span style="" class="">)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> (-<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>...<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>, -<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>...<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span>):</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; print(<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"(</span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>somePoint.<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">), </span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>somePoint.<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)) is inside the box"</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">default<span style="" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; print(<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"(</span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>somePoint.<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">), </span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>somePoint.<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)) is outside of the box"</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">}</div></div><div class=""><br class=""></div><div class="">with the proposed format so the underscore does kind of act like a default in the existing switch statement:&nbsp;</div></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let </span>string =&nbsp;somePoint ?</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>"(0, 0) is at the origin"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(<span style="color: rgb(187, 44, 162);" class="">_</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):<span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">), 0) is on the x-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(187, 44, 162);" class="">_</span>):<span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: rgb(209, 47, 27);" class="">"(0,</span><span style="color: rgb(209, 47, 27);" class="">&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is on the y-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(-<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>, -<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>): &nbsp;&nbsp;<span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is inside the box"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(_, _):<span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is outside of the box"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><br class=""></div></div><div class="">So, it kind of used like a default. Note, I am suggesting that this also work, if it seems too loose, this would help add structure in more complex cases.&nbsp;</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let&nbsp;</span>string =&nbsp;somePoint ?</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="color: rgb(187, 44, 162);" class="">case</span>&nbsp;(<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):&nbsp;<span class="Apple-tab-span" style="white-space: pre;">                </span>"(0, 0) is at the origin"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="color: rgb(187, 44, 162);" class="">case&nbsp;</span>(<span style="color: rgb(187, 44, 162);" class="">_</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">), 0) is on the x-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="color: rgb(187, 44, 162);" class="">case&nbsp;</span>(<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(187, 44, 162);" class="">_</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(0,</span><span style="color: rgb(209, 47, 27);" class="">&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is on the y-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="color: rgb(187, 44, 162);" class="">case&nbsp;</span>(-<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>, -<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>): &nbsp;&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is inside the box"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="color: rgb(187, 44, 162);" class="">default</span>:<span class="Apple-tab-span" style="white-space: pre;">                        </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is outside of the box"</span></div></div><div class=""><br class=""></div><div class="">So you could still do as you suggest:&nbsp;</div><div class=""><br class=""></div><div class=""><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let&nbsp;</span>string =&nbsp;somePoint ?</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):&nbsp;<span class="Apple-tab-span" style="white-space: pre;">                </span>"(0, 0) is at the origin"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(<span style="color: rgb(187, 44, 162);" class="">_</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">), 0) is on the x-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(187, 44, 162);" class="">_</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(0,</span><span style="color: rgb(209, 47, 27);" class="">&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is on the y-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(-<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>, -<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>): &nbsp;&nbsp;<span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is inside the box"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="color: rgb(187, 44, 162);" class="">default</span>:<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is outside of the box"</span></div></div><div class=""><br class=""></div></div><div class="">Mathew says that he thinks that parenthesis should not be required, but I think it seems a little loose without them. It is similar to how control structures have { } around things and I am worried about creating ambiguity.&nbsp;</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let&nbsp;</span>string =&nbsp;somePoint ?(</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):&nbsp;<span class="Apple-tab-span" style="white-space: pre;">                </span>"(0, 0) is at the origin"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(<span style="color: rgb(187, 44, 162);" class="">_</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">), 0) is on the x-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(187, 44, 162);" class="">_</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(0,</span><span style="color: rgb(209, 47, 27);" class="">&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is on the y-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(-<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>, -<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>): &nbsp;&nbsp;<span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is inside the box"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(_, _):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is outside of the box"</span></div></div><div class="">}</div><div class=""><br class=""></div><div class="">I don’t think the “case” and “default" is as necessary with the parenthesis around it.&nbsp;</div><div class=""><br class=""></div><div class="">Arg! I still want to put the control value inside though! It just kind of floats out there otherwise.&nbsp;</div><div class=""><br class=""></div><div class=""><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let&nbsp;</span>string = ?(somePoint,</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):&nbsp;<span class="Apple-tab-span" style="white-space: pre;">                </span>"(0, 0) is at the origin"</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(<span style="color: rgb(187, 44, 162);" class="">_</span>,&nbsp;<span style="color: rgb(39, 42, 216);" class="">0</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">), 0) is on the x-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; (<span style="color: rgb(39, 42, 216);" class="">0</span>,&nbsp;<span style="color: rgb(187, 44, 162);" class="">_</span>):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(0,</span><span style="color: rgb(209, 47, 27);" class="">&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is on the y-axis"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(-<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>, -<span style="color: rgb(39, 42, 216);" class="">2</span>...<span style="color: rgb(39, 42, 216);" class="">2</span>): &nbsp;&nbsp;<span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is inside the box"</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;(_, _):<span class="Apple-tab-span" style="white-space: pre;">                </span><span style="color: rgb(209, 47, 27);" class="">"(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">0</span><span style="color: rgb(209, 47, 27);" class="">),&nbsp;</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>somePoint.<span style="color: rgb(39, 42, 216);" class="">1</span><span style="color: rgb(209, 47, 27);" class="">)) is outside of the box"</span></div></div><div class="">}</div><div class=""><br class=""></div><div class="">To point 3: That the ternary presents confusion by using the colon. I think that confusion drops away with the _ as the default. The rule would be that switch expressions would always be exhaustively specified or must use default. For the boolean and index forms the colon does not create confusion, they are used to return the case that does not match one of the choices.&nbsp;</div><div class=""><br class=""></div><div class=""><div class=""><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let</span><font face="Menlo" class="">&nbsp;fb = pickOne ?&nbsp;</font><font color="#d12f1b" face="Menlo" class="">“A",</font><font face="Menlo" class="">&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"B"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"C"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"D"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"E"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"F"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"G</span><font face="Menlo" class=""><font color="#d12f1b" class="">”</font>&nbsp;:&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"Z"</span></div></div><div class=""><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let</span><font color="#008400" class="" style="font-family: Menlo;">&nbsp;fe = truthy == truth ?&nbsp;</font><font color="#272ad8" class=""><font face="Menlo" class="">“unlikely</font></font><font class=""><font color="#272ad8" face="Menlo" class="">” :</font><font face="Menlo" color="#008400" class="">&nbsp;</font></font><font color="#272ad8" face="Menlo" class="">“likely”</font></div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">or:</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;"><font color="#272ad8" face="Menlo" class=""><div class="" style="font-family: Helvetica;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let</span><font face="Menlo" class="">&nbsp;fb = pickOne ?&nbsp;</font><font color="#d12f1b" face="Menlo" class="">“A",</font><font face="Menlo" class="">&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"B"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"C"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"D"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"E"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"F"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"G</span><font face="Menlo" class=""><font color="#d12f1b" class="">”</font>&nbsp;<span style="color: rgb(187, 44, 162);" class="">default:</span></font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"Z"</span></div></div><div class="" style="font-family: Helvetica;"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let</span><font color="#008400" class="" style="font-family: Menlo;">&nbsp;fe = truthy == truth ?&nbsp;</font><font color="#272ad8" class=""><font face="Menlo" class="">“unlikely</font></font><font class=""><font color="#272ad8" face="Menlo" class="">”&nbsp;</font></font><span style="color: rgb(187, 44, 162); font-family: Menlo;" class="">default:</span><font class=""><font face="Menlo" color="#008400" class="">&nbsp;</font></font><font color="#272ad8" face="Menlo" class="">“likely”</font></div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;">or maybe:</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;"><font color="#272ad8" face="Menlo" class=""><div class="" style="font-family: Helvetica;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let</span><font face="Menlo" class="">&nbsp;fb = pickOne ?&nbsp;</font><font color="#d12f1b" face="Menlo" class="">“A",</font><font face="Menlo" class="">&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"B"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"C"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"D"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"E"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"F"</span><font face="Menlo" class="">,&nbsp;</font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"G</span><font face="Menlo" class=""><font color="#d12f1b" class="">”</font>&nbsp;<span style="color: rgb(187, 44, 162);" class="">else:</span></font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"Z"</span></div></div><div class="" style="font-family: Helvetica;"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-family: Menlo; color: rgb(187, 44, 162);">let</span><font color="#008400" class="" style="font-family: Menlo;">&nbsp;fe = truthy == truth ?&nbsp;</font><font color="#272ad8" class=""><font face="Menlo" class="">“unlikely</font></font><font class=""><font color="#272ad8" face="Menlo" class="">”&nbsp;</font></font><span style="color: rgb(187, 44, 162); font-family: Menlo;" class="">else:</span><font class=""><font face="Menlo" color="#008400" class="">&nbsp;</font></font><font color="#272ad8" face="Menlo" class="">“likely”</font></div><div class=""><br class=""></div></div></div></font></div></div></div></div></font></div></div></div></div>Not necessarily recommending that last one but trying it out. Since boolean “ifs" use “else" rather than default.&nbsp;</div><div class=""><br class=""></div></div></div></blockquote><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></body></html>