<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="">I see what you’re saying now. Thanks.<div class="">-Ben<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 1, 2016, at 11:28 PM, rintaro ishizaki <<a href="mailto:fs.output@gmail.com" class="">fs.output@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2016-11-02 13:14 GMT+09:00 Benjamin Spratling via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class="">CGRect(origin:.zero, size:..</div><div class=""><br class=""></div><div class="">is pretty nice. Why do you want to get rid of it?</div></div></blockquote><div class=""><br class=""></div><div class="">No, I'm proposing to reject CGRect(origin:. zero, size:..)</div><div class=""><br class=""></div><div class=""> <font face="monospace, monospace" class="">'.' whitespace identifier</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div>Reject whitespace in this.</div><div class="gmail_quote"><br class=""></div><div class="gmail_quote"> <span style="font-family:monospace,monospace" class="">'.' identifier</span></div><br class="">is OK.</div><div class="gmail_extra"><br class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">return values</div><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span>.flatMap {</div></div></blockquote><div class=""><br class=""></div><div class="">is OK. but </div><div class=""><br class=""></div><div class=""> return valus</div><div class=""> .</div><div class=""> flatMap {</div><div class=""><br class=""></div><div class="">should be rejected.</div><div class=""> </div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">                </span>//code</div><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span>} </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span>.filter {</div><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">                </span>//code</div><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span>.sorted { /* code */ <span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span> }</div><div class=""><span class="gmail-m_-3812367530394476926Apple-tab-span" style="white-space:pre-wrap">        </span>.first</div><div class=""><br class=""></div><div class="">is also pretty clean, considering.</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="gmail-h5"><div class="">On Nov 1, 2016, at 11:06 PM, rintaro ishizaki via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:</div><br class="gmail-m_-3812367530394476926Apple-interchange-newline"></div></div><div class=""><div class=""><div class="gmail-h5"><div dir="ltr" class=""><div class="">Hi all,</div><div class=""><br class=""></div><div class="">The compiler currently accepts these expressions:<br class=""></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><font face="monospace, monospace" class="">x = expr . member</font></div><div class=""><font face="monospace, monospace" class="">x = </font><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class=""> </font><span style="font-family:monospace,monospace" class="">.</span></div><div class=""><font face="monospace, monospace" class=""> member</font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><font face="monospace, monospace" class="">x = expr</font></div><div class=""><font face="monospace, monospace" class=""> .</font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><font face="monospace, monospace" class=""> member</font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><span style="font-family:monospace,monospace" class="">x = .</span><br class=""></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><font face="monospace, monospace" class=""> implicitMember</font></div></blockquote><div class=""><font face="monospace, monospace" class=""><br class=""></font></div>I propose to reject them because this could cause some unnecessary confusion.<div class="">(especially after <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0071-member-keywords.md" target="_blank" class="">SE-0071</a>)<br class=""><div class="">For instance:<div class=""><div class=""><br class=""></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><div class=""><div class=""><font face="monospace, monospace" class="">_ = foo(.</font></div></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class="">func bar(x: Int) { ... }</font></div></div></div></blockquote><div class=""><div class=""><div class=""><br class=""></div><div class="">The current compiler parses this as:</div><div class=""><br class=""></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><div class=""><div class=""><font face="monospace, monospace" class=""><font color="#999999" class="">// call foo(_:_:)</font></font></div></div></div><div class=""><div class=""><font face="monospace, monospace" class="">_ = foo(.func <font color="#999999" class="">// </font></font><span style="color:rgb(153,153,153);font-family:monospace,monospace" class="">implicit-member-expression</span></div><div class=""><span style="color:rgb(153,153,153);font-family:monospace,monospace" class=""> // missing ','</span></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class=""> <font color="#999999" class="">// call bar(x:_:) with </font></font><span style="color:rgb(153,153,153);font-family:monospace,monospace" class="">argument 'Int' and trailing closure</span></div></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class=""> bar(x<font class="">: Int</font>) { ... }</font></div></div></div><div class=""><div class=""><div class=""><font color="#999999" style="font-family:monospace,monospace" class="">// missing closing ')'</font></div></div></div></blockquote><div class=""><div class=""><div class=""><br class=""></div><div class="">Here's the summary of <i class="">current</i> behavior:<br class=""></div></div><div class=""><br class=""></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><div class=""><font face="monospace, monospace" class="">// accept</font></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class="">.member</font></div></div><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div class=""><div class=""><font face="monospace, monospace" class="">// accept</font></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class=""> .member</font></div></div><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div class=""><div class=""><font face="monospace, monospace" class="">// accept</font></div></div><div class=""><span style="font-family:monospace,monospace" class="">expr</span><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class=""> .member</font></div></div><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div class=""><div class=""><font face="monospace, monospace" class="">// reject with fix-it to remove white spaces</font></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class="">. member</font></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class="">// </font><span style="font-family:monospace,monospace" class="">two distinct statements</span></div></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class="">. </font><span style="font-family:monospace,monospace" class="">// reject as missing member name</span></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class=""> member</font></div></div></div><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div class=""><div class=""><font face="monospace, monospace" class="">// accept</font></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class=""> . member</font></div></div><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class="">// accept</font></div></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">expr</span><font face="monospace, monospace" class=""> .</font></div></div><div class=""><div class=""><div class=""><font face="monospace, monospace" class=""> member</font></div></div></div></blockquote><div class=""><div class=""><br class="">I propose to change the last 2 examples:</div><div class=""><span style="font-family:monospace,monospace" class=""><br class=""></span></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><div class=""><span style="font-family:monospace,monospace" class="">// reject with fix-it to remove white spaces</span></div></div><div class=""><div class=""><font face="monospace, monospace" class="">some . member</font></div></div><div class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div class=""><div class=""><span style="font-family:monospace,monospace" class="">// two distinct statements </span></div></div><div class=""><div class=""><font face="monospace, monospace" class="">some . // reject as missing member name</font></div></div><div class=""><div class=""><font face="monospace, monospace" class=""> member</font></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">I think, this is consistent behavior with '<font face="monospace, monospace" class="">.</font>' at postfix position.</div><div class=""><br class=""></div><div class="">Specifically:</div><div class=""><ul class=""><li class="">If '<font face="monospace, monospace" class="">.</font>' is at <i class="">prefix-operator</i> or <i class="">unspaced-binary-operator</i> position, accept.<br class=""></li><li class="">If the next token after '<font face="monospace, monospace" class="">.</font>' is at the same line, propose to fix-it.<br class=""></li><li class="">Otherwise, reject it as missing member name.</li></ul></div><div class="">This affect following expressions and types in the grammer:</div><div class=""><br class=""></div><div class="">expressions:</div> self-method-expression<br class=""> self-initializer-expression <br class=""> superclass-method-expression<br class=""> superclass-initializer-express<wbr class="">ion<br class=""> implicit-member-expression<br class=""> initializer-expression<br class=""> explicit-member-expression<br class=""> postfix-self-expression<br class=""> explicit-member-expression<br class=""> postfix-self-expression</div><div class="">types:<br class=""><div class=""> type-identifier<br class=""></div></div> metatype-type<div class=""><br class=""></div><div class="">Of course this is a source breaking change, though.</div><div class="">Any thought?</div><div class=""><br class=""></div></div></div></div></div>
______________________________<wbr class="">_________________<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" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class=""></div></blockquote></div><br class=""></div><br class="">______________________________<wbr class="">_________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" 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/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></div></div></body></html>