<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=""><div class=""><div id="signature" class=""><br class=""></div></div><div><blockquote type="cite" class=""><div class="">On 2017-10-12, at 12:03 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">Single elements can legally span multiple lines; this would be hugely source breaking. What problem are you trying to solve?<br class=""></div></blockquote><div><br class=""></div><div>The same problem that is solved by the precedent of semicolons being optional (clutter). I don’t see anything substantive about the analogy that does not hold.</div><div><br class=""></div><div>Plus there is the meta-problem of inconsistency, where the analogy is apt but not expressed in the language.</div><div><br class=""></div><blockquote type="cite" class=""><div class="">On Thu, Oct 12, 2017 at 13:50 Dave Yost via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class="">Speaking as a huge fan of optional semicolons...</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">This seems clear:</div><div class=""><br class=""></div><span style="font-size:11px" class=""><span style="background-color:white;font-family:Menlo" class="">&nbsp; &nbsp; &nbsp;semicolon : sequence of statements</span><br class=""></span><div class=""><font face="Menlo" class=""><span style="background-color:white;font-size:11px" class="">&nbsp; :: comma &nbsp; &nbsp; : sequence of elements in an array literal</span></font></div><div class=""><br class=""></div><div class="">and so it occurred to me that this should hold:</div><div class=""><br class=""></div><div class=""><span style="font-size:11px;background-color:white;font-family:Menlo" class="">&nbsp; &nbsp; &nbsp;A semicolon : the last statement &nbsp; &nbsp; on a line.</span></div><div class=""><font face="Menlo" class=""><span style="background-color:white;font-size:11px" class="">&nbsp; ::&nbsp;A comma &nbsp; &nbsp; : the last array element on a line.</span></font></div><div class=""><font face="Menlo" class=""><span style="background-color:white;font-size:11px" class=""><br class=""></span></font></div><div class=""><font face="Menlo" class=""><span style="background-color:white;font-size:11px" class="">&nbsp;&nbsp;</span></font><span style="font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class="">∴ &nbsp;A&nbsp;</span><span style="font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class="">comma after the last array element on a line should be</span><span style="font-family:Menlo;font-size:11px;background-color:white" class="">&nbsp;optional.</span></div><div class=""><br class=""></div><div class="">and these should be legal Swift:</div><div class=""><br class=""></div><div class=""><span style="font-size:11px" class=""><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(172,172,172)" class="">&nbsp; let</span><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp;list = [</span><br class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">1</span><br class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">2</span><br class=""></span><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><span style="font-size:11px" class="">&nbsp; ]</span></div></div><div class=""><span style="font-size:11px" class=""><br class=""></span></div><div class=""><span style="font-size:11px" class=""><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(172,172,172)" class="">&nbsp;&nbsp;</span></span><span style="color:rgb(172,172,172);font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class="">let</span><span style="font-size:11px" class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp;dict = [</span><br class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">1 : 2</span><br class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">2 : 3</span><br class=""></span><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><span style="font-size:11px" class="">&nbsp; ]</span></div></div><div class=""><br class=""></div><div class="">equivalent to:</div><div class=""><br class=""></div><div class=""><div class=""><span style="font-size:11px" class=""><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(172,172,172)" class="">&nbsp;&nbsp;</span></span><span style="color:rgb(172,172,172);font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class="">let</span><span style="font-size:11px" class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp;list = [&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">1,&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">2&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">] ;&nbsp;</span></span><span style="color:rgb(172,172,172);font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class="">let</span><span style="font-size:11px" class=""><span style="font-family:Menlo;background-color:rgb(255,255,255)" class="">&nbsp;dict = [&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">1 : 2,&nbsp;</span><span style="font-family:Menlo;background-color:rgb(255,255,255);color:rgb(39,42,216)" class="">2 : 3 ]</span></span></div><div class=""><div style="margin:0px;line-height:normal" class=""><br class=""></div></div></div><div style="margin:0px;line-height:normal" class=""><br class=""></div><div style="margin:0px;line-height:normal" class="">Or, as the Language Reference would say:</div><div style="margin:0px;line-height:normal" class=""><br class=""></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">A semicolon (</span><code class="m_7548383227963968971code-voice" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-family:Menlo,monospace;word-wrap:break-word">;</code><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">) can optionally appear after any statement and is used to separate multiple statements if they appear on the same line.</span></div></blockquote><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><br class=""></div><div style="margin:0px;line-height:normal" class=""><blockquote style="background-color:rgb(255,255,255);font-family:Optima;margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div style="margin:0px;line-height:normal;font-family:Menlo" class=""><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">A comma (</span><code class="m_7548383227963968971code-voice" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-family:Menlo,monospace;word-wrap:break-word">,</code><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">) can optionally appear after any element of an array literal and is used to separate multiple elements if they appear on the same line.</span></div></blockquote><div style="margin:0px;line-height:normal" class=""><br class=""></div><div style="margin:0px;line-height:normal" class="">Or:</div><div style="margin:0px;line-height:normal" class=""><div style="margin:0px;line-height:normal" class=""><br class=""></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div style="margin:0px;line-height:normal" class=""><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">A semicolon (</span><code class="m_7548383227963968971code-voice" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-family:Menlo,monospace;word-wrap:break-word">;</code><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">) separates statements but is optional</span><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">&nbsp;after the last statement on a line.</span></div></blockquote><div style="background-color:rgb(255,255,255);font-family:Menlo;margin:0px;line-height:normal" class=""><br class=""></div><div style="background-color:rgb(255,255,255);margin:0px;line-height:normal" class=""><blockquote style="font-family:Optima;margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div style="margin:0px;line-height:normal;font-family:Menlo" class=""><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">A comma (</span><code class="m_7548383227963968971code-voice" style="border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(128,128,128);font-family:Menlo,monospace;word-wrap:break-word">,</code><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">) separates elements of an array literal but is</span><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">&nbsp;optional after the last</span><span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif" class="">&nbsp;element on a line.</span></div></blockquote><font color="#414141" face="Helvetica, Arial, sans-serif" class=""><br class=""></font></div><div style="background-color:rgb(255,255,255);margin:0px;line-height:normal" class=""><font color="#414141" face="Helvetica, Arial, sans-serif" class=""><span style="font-size:11.375px" class=""><br class=""></span></font></div></div></div></div>_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></body></html>