<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 6:20 PM, Xiaodi Wu <span dir="ltr"><<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-">On Thu, Oct 12, 2017 at 2:47 PM, Jarod Long via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">I don't really expect this sort of syntactic sugar to be popular enough to make it through swift-evolution, and I don't think it's worth the distraction from more important priorities at this time, but for what it's worth, I've enjoyed this feature in other languages that support it. It plays a small part in making code more focused by eliminating unnecessary syntax.
<div><br></div>
<div>I could be wrong, but I'm not so sure that this would actually be source breaking. Even if you have something like this:</div>
<div><br></div>
<div><font face="Monaco">let points = [</font></div>
<div><font face="Monaco"> Point(</font></div>
<div><font face="Monaco"> x: 1.0,</font></div>
<div><font face="Monaco"> y: 2.0</font></div>
<div><font face="Monaco"> ),</font></div>
<div><font face="Monaco"> Point(</font></div>
<div><font face="Monaco"> x: 3.0,</font></div>
<div><font face="Monaco"> y: 4.0</font></div>
<div><font face="Monaco"> )</font></div>
<div><font face="Monaco">]</font></div>
<div><br></div>
<div>Proper implementation of this feature wouldn't suddenly interpret `Point(` as its own element.</div></div></div></blockquote><div><br></div></span><div>There are those of us who respect the 80-character line and break expressions across lines:</div><div><br></div><div>let x = [</div><div> NSVeryVeryVeryLongType</div><div> .veryVeryVeryLongProperty +</div><div> NSVeryVeryVeryLongType2</div><div> .veryVeryVeryLongProperty2,</div><div>]</div><div><br></div><div>It would be a pleasant surprise if a grammar with optional commas can avoid blowing up existing code; I'm quite doubtful.<br></div><span class="gmail-"><div><br></div><div><br></div></span></div></div></div></blockquote><div><br></div><div>An argument against optional commas,, or an indictment of overly verbose Foundation APIs… 🤔🤔🤔 <br></div></div><br></div></div>