<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><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><h4 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:16px;line-height:1.25;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;" class="">Dots in operators</h4><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class="">The current requirements for dots in operator names are:</p><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;color:rgb(119,119,119);border-left:0.25em solid rgb(221,221,221);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">If an operator doesn’t begin with a dot, it can’t contain a dot elsewhere.</div></blockquote><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class="">This proposal&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">changes the rule</span>&nbsp;to:</p><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;color:rgb(119,119,119);border-left:0.25em solid rgb(221,221,221);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">Dots may only appear in operators in runs of two or more.</div></blockquote><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class="">Under the revised rule,&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">..&lt;</code>&nbsp;and&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">...</code>&nbsp;are allowed, but&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">&lt;.&lt;</code>&nbsp;is not. We also&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">reserve the&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">..</code>&nbsp;operator</span>, permitting the compiler to use&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">..</code>&nbsp;for a "method cascade" syntax in the future, as&nbsp;<a href="http://news.dartlang.org/2012/02/method-cascades-in-dart-posted-by-gilad.html" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">supported by Dart</a>.</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class="">Motivations for incorporating the two-dot rule are:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:16px" class=""><li style="box-sizing:border-box" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">It helps avoid future lexical complications arising from lone&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">.</code>s.</p></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">It's a conservative approach, erring towards overly restrictive. Dropping the rule in future (thereby allowing single dots) may be possible.</p></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">It doesn't require special cases for existing infix dot operators in the standard library,&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">...</code>&nbsp;(closed range) and&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">..&lt;</code>&nbsp;(half-open range). It also leaves the door open for the standard library to add analogous half-open and fully-open range operators&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">&lt;..</code>&nbsp;and&nbsp;<code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px" class="">&lt;..&lt;</code>.</p></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">If we fail to adopt this rule now, then future backward-compatibility requirements will preclude the introduction of some potentially useful language enhancements.</p></li></ul><h4 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:16px;line-height:1.25;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;" class=""><a id="gmail-user-content-grammar-changes-1" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#grammar-changes-1" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1" class="gmail-anchor"></a>Grammar changes</h4><pre style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-radius:3px;color:rgb(51,51,51)" class=""><code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;padding:0px;margin:0px;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:transparent;border-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;word-wrap:normal" class="">operator → operator-head operator-characters[opt]

operator-head → ! % &amp; * + - / &lt; = &gt; ? ^ | ~
operator-head → operator-dot operator-dots
operator-character → operator-head
operator-characters → operator-character operator-character[opt]

operator-dot → .
operator-dots → operator-dot operator-dots[opt]
</code></pre><h3 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;" class=""><a id="gmail-user-content-emoji" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#emoji" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1" class="gmail-anchor"></a></h3></div></div></div></div></div></div></blockquote></div>I think there's a mismatch between the English and grammar. &nbsp;For example, is +..+ allowed or not?<div class=""><br class=""></div><div class="">The English rule does allow +..+ because its dots appear in a run of two.</div><div class=""><br class=""></div><div class="">The grammar allows a run of one or more dots as an operator head, but never allows dots as characters appearing in the middle of an operator, regardless of how many dots appear next to each other. &nbsp;The grammar wouldn't allow +..+ because the dots don't come at the beginning.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Here's an alternate version of the grammar that matches the "two or more" rule. &nbsp;Because we no longer distinguish between which characters are allowed as the first character of an operator vs a character inside, there's no longer a need for a separate operator-head.</div><div class=""><br class=""></div><div class=""><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class="">operator --&gt; operator-character&nbsp;</span></font><span style="color: rgb(51, 51, 51); font-family: Menlo; font-size: 14px;" class="">operator</span><span style="font-size: 14px; color: rgb(51, 51, 51); font-family: Menlo;" class="">-OPT</span></div><div class=""><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class="">operator-character --&gt; ! % &amp; * + - / &lt; = &gt; ? ^ | ~</span></font></div><div class=""><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class="">operator-</span></font><span style="color: rgb(51, 51, 51); font-family: Menlo; font-size: 14px;" class="">character</span><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class="">&nbsp;--&gt; operator-dots</span></font></div><div class=""><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font color="#333333" face="Menlo" class=""><span style="font-size: 14px;" class="">operator-dots --&gt; .. operator-additional-dots-OPT</span></font></div><div class=""><span style="color: rgb(51, 51, 51); font-family: Menlo; font-size: 14px;" class="">operator-additional-dots --&gt; .&nbsp;</span><span style="color: rgb(51, 51, 51); font-family: Menlo; font-size: 14px;" class="">operator-additional-dots-OPT</span></div></body></html>