<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="">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. <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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>"a"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"e"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"i"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"o"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"u"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>"b"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"c"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"d"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"f"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"g"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"h"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"j"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"k"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"l"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"m"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class="">"n"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"p"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"q"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"r"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"s"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"t"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"v"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"w"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"x"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"y"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"z"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> 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="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</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: #000000" class=""> print(</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">someCharacter</span>) is not a vowel or a consonant"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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> someCharacter ?( </div><div style="margin: 0px; line-height: normal;" class=""> <font face="Menlo" class="">"a"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"e"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"i"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"o"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" class=""><font face="Menlo" class="">“u</font></font><font color="#d12f1b" face="Menlo" class="">”</font><font face="Menlo" class="">: </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=""> </font><font color="#d12f1b" style="font-family: Menlo;" class="">"b"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"c"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"d"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"f"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"g"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"h"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"j"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"k"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" style="font-family: Menlo;" class="">"l"</font><span style="font-family: Menlo; color: rgb(0, 0, 0);" class="">, </span><font color="#d12f1b" class=""><font face="Menlo" class="">“m</font></font><font face="Menlo" class=""><font color="#d12f1b" class="">”</font>, </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> </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=""> “_”: <span style="color: rgb(209, 47, 27);" class="">"</span><span style="color: rgb(0, 0, 0);" class="">\</span><span style="color: rgb(209, 47, 27);" class="">(</span><span style="color: rgb(0, 0, 0);" 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="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>approximateCount<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">case<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</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: #000000" class=""> </span>naturalCount<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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>..<<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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>naturalCount<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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>..<<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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>naturalCount<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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>..<<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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>naturalCount<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>100<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">..<</span>1000<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</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: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">naturalCount</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> = </span>"hundreds of"</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">default<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</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: #000000" class=""> </span>naturalCount<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" 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 </span>naturalCount<span style="color: rgb(79, 129, 135);" class=""> =</span> <span style="color: rgb(79, 129, 135);" class="">approximateCount</span> ?(</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="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span><span style="color: rgb(0, 0, 0);" class=""> <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>..<<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span>: <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..<<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">12</span>: <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>..<<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="color: rgb(0, 0, 0);" class="">..<</span><font color="#272ad8" class="">1000</font><span style="color: rgb(0, 0, 0);" class="">:</span> <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=""> <span class="Apple-tab-span" style="white-space: pre;">        </span>_: <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="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"There are </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">This:</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>anotherPoint<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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>"on the x-axis with an x value of <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>)"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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>"on the y-axis with a y value of <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">y</span>)"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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>"somewhere else at (<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">y</span>))"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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> ?(</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> x, </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">): </span>"on the x-axis with an x value of <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>)"</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>(<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> y): </span>"on the y-axis with a y value of <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">y</span>)"</div><div style="margin: 0px; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> (x, y): </span>"somewhere else at (<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class="">print(</span>resultString<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">This:</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>yetAnotherPoint<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">y</span>)) is on the line x == y"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">y</span>)) is on the line x == -y"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">y</span>)) is just some arbitrary point"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> (x, y) </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">where</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> x == y: </span>"(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> (x, y) </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">where</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> x == -y: </span>"(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> (x, y):<span class="Apple-tab-span" style="white-space:pre">                </span> </span>"(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">x</span>), <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> numberSymbol: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Character</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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: #000000" class=""> </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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>numberSymbol<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>"1"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">١</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">一</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๑</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>possibleIntegerValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>"2"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">٢</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">二</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๒</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>possibleIntegerValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>"3"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">٣</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">三</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๓</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>possibleIntegerValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>"4"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'Courier New';" class="">٤</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: 'PingFang SC';" class="">四</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">, </span>"<span style="line-height: normal; font-family: Ayuthaya;" class="">๔</span>"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>possibleIntegerValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; line-height: normal; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> integerValue = </span>possibleIntegerValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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: #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>"The integer value of <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>) is <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">integerValue</span>)."<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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>"An integer value could not be found for <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>)."<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="color: rgb(0, 0, 0); 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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> numberSymbol: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Character</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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: #000000" class=""> </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>? = <span style="color: rgb(79, 129, 135);" class="">numberSymbol</span> ?(</div><div style="margin: 0px; line-height: normal;" class=""> <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=""> <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=""> <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=""> <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=""> <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="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> integerValue = </span>possibleIntegerValue<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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: #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>"The integer value of <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>) is <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">integerValue</span>)."<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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="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>"An integer value could not be found for <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">numberSymbol</span>)."<span style="font-variant-ligatures: no-common-ligatures; color: #000000" 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 <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><div>This last one does not automatically make it an optional, you need to manually put the optional type in, just as ternary does. </div><div><br class=""></div><div>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. </div><div><br class=""></div><div>- Paul</div><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 6, 2016, at 11:03 AM, Paul Ossenbruggen <<a href="mailto:possen@gmail.com" class="">possen@gmail.com</a>> 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. </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 </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=""> </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=""> 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=""> 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=""> 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=""> 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: </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 = somePoint ?</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <span style="color: rgb(39, 42, 216);" class="">0</span>): <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=""> (<span style="color: rgb(187, 44, 162);" class="">_</span>, <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=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <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=""> </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=""> (-<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>): <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="">), </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=""> (_, _):<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="">), </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. </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 = somePoint ?</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> <span style="color: rgb(187, 44, 162);" class="">case</span> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <span style="color: rgb(39, 42, 216);" class="">0</span>): <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=""> <span style="color: rgb(187, 44, 162);" class="">case </span>(<span style="color: rgb(187, 44, 162);" class="">_</span>, <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=""> <span style="color: rgb(187, 44, 162);" class="">case </span>(<span style="color: rgb(39, 42, 216);" class="">0</span>, <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=""> </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=""> <span style="color: rgb(187, 44, 162);" class="">case </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>): <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="">), </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=""> <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="">), </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: </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 </span>string = somePoint ?</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <span style="color: rgb(39, 42, 216);" class="">0</span>): <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=""> (<span style="color: rgb(187, 44, 162);" class="">_</span>, <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=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <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=""> </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=""> (-<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>): <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="">), </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=""> <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="">), </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. </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 = somePoint ?(</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <span style="color: rgb(39, 42, 216);" class="">0</span>): <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=""> (<span style="color: rgb(187, 44, 162);" class="">_</span>, <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=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <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=""> </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=""> (-<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>): <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="">), </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=""> (_, _):<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="">), </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. </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. </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 </span>string = ?(somePoint,</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <span style="color: rgb(39, 42, 216);" class="">0</span>): <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=""> (<span style="color: rgb(187, 44, 162);" class="">_</span>, <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=""> (<span style="color: rgb(39, 42, 216);" class="">0</span>, <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=""> </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=""> (-<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>): <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="">), </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=""> (_, _):<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="">), </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. </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=""> fb = pickOne ? </font><font color="#d12f1b" face="Menlo" class="">“A",</font><font face="Menlo" class=""> </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"B"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"C"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"D"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"E"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"F"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"G</span><font face="Menlo" class=""><font color="#d12f1b" class="">”</font> : </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;"> fe = truthy == truth ? </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=""> </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=""> fb = pickOne ? </font><font color="#d12f1b" face="Menlo" class="">“A",</font><font face="Menlo" class=""> </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"B"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"C"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"D"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"E"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"F"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"G</span><font face="Menlo" class=""><font color="#d12f1b" class="">”</font> <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;"> fe = truthy == truth ? </font><font color="#272ad8" class=""><font face="Menlo" class="">“unlikely</font></font><font class=""><font color="#272ad8" face="Menlo" class="">” </font></font><span style="color: rgb(187, 44, 162); font-family: Menlo;" class="">default:</span><font class=""><font face="Menlo" color="#008400" class=""> </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=""> fb = pickOne ? </font><font color="#d12f1b" face="Menlo" class="">“A",</font><font face="Menlo" class=""> </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"B"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"C"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"D"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"E"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"F"</span><font face="Menlo" class="">, </font><span class="" style="font-family: Menlo; color: rgb(209, 47, 27);">"G</span><font face="Menlo" class=""><font color="#d12f1b" class="">”</font> <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;"> fe = truthy == truth ? </font><font color="#272ad8" class=""><font face="Menlo" class="">“unlikely</font></font><font class=""><font color="#272ad8" face="Menlo" class="">” </font></font><span style="color: rgb(187, 44, 162); font-family: Menlo;" class="">else:</span><font class=""><font face="Menlo" color="#008400" class=""> </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. </div><div class=""><br class=""></div></div></div></blockquote><div><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></body></html>