<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 very much support the proposal to rationalize our handling of identifier characters. &nbsp;<div class=""><br class=""></div><div class="">I also support doing something similar for operator symbols. &nbsp;However, I agree feedback from others that this proposal goes way to far in removing our ability to use mathematical operators. &nbsp;</div><div class=""><br class=""></div><div class="">If I’m reading the proposal and discussion properly, the group has not able to reach consensus on the right criteria for operator symbols, but is hopeful that will be possible after the Unicode Consortium completes its work. &nbsp;I think it would be far better to defer the changes to valid operator symbols until that time (removing only symbols which are currently treated as operators but for which the proposal suggests should be available for identifiers instead).</div><div class=""><br class=""></div><div class="">The argument against symbols is reasonable for *new* operators, defined by an individual programmer. &nbsp;But operator symbols that have been defined by mathematics for a very long time are extremely useful. &nbsp;Notation matters. &nbsp;They impose very little additional burden when learned along side the mathematical concepts. &nbsp;IMO, the best argument against using unicode symbols for operators defined by mathematics is that they are currently difficult to type. &nbsp;This is an argument with a limited lifespan and should not carry more weight than it deserves in the design of a language positioned to be the language for the next 20 years. &nbsp;I strongly believe that removing them, even temporarily, is a mistake.</div><div class=""><br class=""></div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 19, 2016, at 1:34 AM, Jacob Bandes-Storch via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Dear Swift-Evolution community,</div><div class=""><br class=""></div><div class="">A few of us have been preparing a proposal to refine the definitions of identifiers &amp; operators. This includes some changes to the permitted Unicode characters.</div><div class=""><br class=""></div><div class="">The latest (perhaps final?) draft is available here:</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; <a href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md" class="">https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md</a></div><div class=""><br class=""></div><div class="">We'd welcome your initial thoughts, and will probably submit a PR soon to the swift-evolution repo for a formal review.&nbsp;Full text follows below.</div><div class=""><br class=""></div><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">—Jacob Bandes-Storch, Xiaodi Wu, Erica Sadun, Jonathan Shapiro<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><h1 style="box-sizing:border-box;margin:0px 0px 16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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="">Refining Identifier and Operator Symbology</h1><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="">Proposal:&nbsp;<a href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">SE-NNNN</a></li><li style="box-sizing:border-box;margin-top:0.25em" class="">Authors:&nbsp;<a href="https://github.com/jtbandes" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Jacob Bandes-Storch</a>,&nbsp;<a href="https://github.com/erica" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Erica Sadun</a>,&nbsp;<a href="https://github.com/xwu" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Xiaodi Wu</a>, Jonathan Shapiro</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Review Manager: TBD</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Status:&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">Awaiting review</span></li></ul><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-introduction" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#introduction" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Introduction</h2><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 seeks to refine and rationalize Swift's identifier and operator symbology. Specifically, this proposal:</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="">adopts the Unicode recommendation for identifier characters, with some minor exceptions;</li><li style="box-sizing:border-box;margin-top:0.25em" class="">restricts the legal operator set to the current ASCII operator characters;</li><li style="box-sizing:border-box;margin-top:0.25em" class="">changes where dots may appear in operators; and</li><li style="box-sizing:border-box;margin-top:0.25em" class="">disallows Emoji from identifiers and operators.</li></ul><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-prior-discussion-threads--proposals" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#prior-discussion-threads--proposals" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Prior discussion threads &amp; proposals</h3><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=""><a href="https://github.com/apple/swift-evolution/pull/531" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Proposal: Normalize Unicode identifiers</a></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160912/027108.html" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Unicode identifiers &amp; operators</a>, with&nbsp;<a href="https://gist.github.com/jtbandes/c0b0c072181dcd22c3147802025d0b59" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">pre-proposal</a>&nbsp;(a precursor to this document)</li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160926/027479.html" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Lexical matters: identifiers and operators</a></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://github.com/apple/swift-evolution/pull/354" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Proposal: Allow Single Dollar Sign as Valid Identifier</a></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/005133.html" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Free the '$' Symbol!</a></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151214/003176.html" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Request to add middle dot (U+00B7) as operator character?</a></li></ul><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-guiding-principles" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#guiding-principles" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Guiding principles</h3><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="">Chris Lattner has written:</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="">…our current operator space (particularly the unicode segments covered) is not super well considered. It would be great for someone to take a more systematic pass over them to rationalize things.</div></blockquote><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="">We need a token to be unambiguously an operator or identifier - we can have different rules for the leading and subsequent characters though.</div></blockquote><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=""><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px" class="">…any proposal that breaks:</p><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" 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="">let 🐶🐮 = "moof"
</code></pre><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">will not be tolerated. :-) :-)</div></blockquote><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-motivation" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#motivation" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Motivation</h2><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="">By supporting custom Unicode operators and identifiers, Swift attempts to accomodate programmers and programming styles from many languages and cultures. It deserves a well-thought-out specification of which characters are valid. However, Swift's current identifier and operator character sets do not conform to any Unicode standards, nor have they been rationalized in the language or compiler documentation.</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="">Identifiers, which serve as&nbsp;<em style="box-sizing:border-box" class="">names</em>&nbsp;for various entities, are linguistic in nature and&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">must</span>&nbsp;permit a variety of characters to properly serve non–English-speaking coders. This issue has been considered by the communities of many programming languages already, and the Unicode Consortium has published recommendations on how to choose identifier character sets — Swift should make an effort to conform to these recommendations.</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="">Operators, on the other hand, should be rare and carefully chosen, because they suffer from low discoverability and difficult readability. They are by nature&nbsp;<em style="box-sizing:border-box" class="">symbols</em>, not names. This places a cognitive cost on users with respect to both recall ("What is the operator that applies the behavior I need?") and recognition ("What does the operator in this code do?"). While&nbsp;<em style="box-sizing:border-box" class="">almost every</em>&nbsp;nontrivial program defines many new identifiers, most programs do not define new operators.</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="">As operators become more esoteric or customized, the cognitive cost rises. Recognizing a function name like&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="">formUnion(with:)</code>&nbsp;is simpler for many programmers than recalling what 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 does. Swift's current operator character set includes many characters that aren't traditional and recognizable operators — this encourages problematic and frivolous uses in an otherwise safe language.</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="">Today, there are many discrepancies and edge cases motivating these changes:</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="">· is an identifier, while • is an operator.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">The Greek question mark ; is a valid identifier.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Braille patterns ⠟ seem letter-like, but are operator characters.</li><li style="box-sizing:border-box;margin-top:0.25em" class=""><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🙂</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🤘</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">▶️</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🛩</span>🂡 are identifiers, while&nbsp;<span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">☹️</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">✌️</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🔼</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">✈️</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">♠️</span>&nbsp;are operators.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Some&nbsp;<em style="box-sizing:border-box" class="">non-combining</em>&nbsp;diacritics ´ ¨ ꓻ are valid in identifiers.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Some completely non-linguistic characters, such as ۞ and ༒, are valid in identifiers.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Some symbols such as ⚄ and ♄ are operators, despite not really being "operator-like".</li><li style="box-sizing:border-box;margin-top:0.25em" class="">A small handful of characters 〡〢〣〤〥〦〧〨〩 〪 〫 〬 〭 〮 〯 are valid in&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">both</span>&nbsp;identifiers and operators.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Some non-printing characters such as 2064 INVISIBLE PLUS and 200B ZERO WIDTH SPACE are valid identifiers.</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Currency symbols are split across operators (¢ £ ¤ ¥) and identifiers ($ ₪ € ₱ ₹ ฿ ...).</li></ul><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 matter should be considered in a near timeframe (Swift 3.1 or 4) as it is both fundamental to Swift and will produce source-breaking changes.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-precedent-in-other-languages" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#precedent-in-other-languages" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Precedent in other languages</h2><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=""><span style="box-sizing:border-box;font-weight:600" class="">Haskell</span>&nbsp;distinguishes identifiers/operators by their&nbsp;<a href="http://www.fileformat.info/info/unicode/category/index.htm" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">general category</a>&nbsp;such as "any Unicode lowercase letter", "any Unicode symbol or punctuation", and so forth. Identifiers can start with any lowercase letter or&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>, and may contain any letter/digit/<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>/<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>. This includes letters like δ and Я, and digits like ٢.</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=""><a href="https://www.haskell.org/onlinereport/syntax-iso.html" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Haskell Syntax Reference</a></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://github.com/ghc/ghc/blob/714bebff44076061d0a719c4eda2cfd213b7ac3d/compiler/parser/Lexer.x#L1949-L1973" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Haskell Lexer</a></li></ul><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=""><span style="box-sizing:border-box;font-weight:600" class="">Scala</span>&nbsp;similarly allows letters, numbers,&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>, 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;in identifiers, distinguishing by general categories&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="">Ll</code>,&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="">Lu</code>,&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;<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="">Lo</code>, 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="">Nl</code>. Operator characters include mathematical and other symbols (<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="">Sm</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="">So</code>) in addition to other ASCII symbol characters.</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=""><a href="http://www.scala-lang.org/files/archive/spec/2.11/01-lexical-syntax.html#lexical-syntax" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Scala Lexical Syntax</a></li></ul><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=""><span style="box-sizing:border-box;font-weight:600" class="">ECMAScript 2015 ("ES6")</span>&nbsp;uses&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="">ID_Start</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="">ID_Continue</code>, as well as&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="">Other_ID_Start</code>&nbsp;/&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="">Other_ID_Continue</code>, for identifiers.</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=""><a href="http://www.ecma-international.org/ecma-262/6.0/#sec-names-and-keywords" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">ECMAScript Specification: Names and Keywords</a></li></ul><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=""><span style="box-sizing:border-box;font-weight:600" class="">Python 3</span>&nbsp;uses&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="">XID_Start</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="">XID_Continue</code>.</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=""><a href="https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-identifier" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">The Python Language Reference: Identifiers and Keywords</a></li><li style="box-sizing:border-box;margin-top:0.25em" class=""><a href="https://www.python.org/dev/peps/pep-3131/" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">PEP 3131: Supporting Non-ASCII Identifiers</a></li></ul><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-proposed-solution" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#proposed-solution" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Proposed solution</h2><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="">For identifiers, adopt the recommendations made in&nbsp;<a href="http://unicode.org/reports/tr31/" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">UAX #31 Identifier and Pattern Syntax</a>, deriving the sets of valid characters from&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="">ID_Start</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="">ID_Continue</code>. Normalize identifiers using Normalization Form C (NFC).</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="">(For operators, no such recommendation currently exists, although active work is in progress to update UAX #31 to address "operator identifiers".)</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="">Restrict operators to those ASCII characters which are currently operators. All other operator characters are removed from the language.</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="">Allow dots in operators in any location, but only in runs of two or more.</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="">(Overall, this proposal is aggressive in its removal of problematic characters. We are not attempting to prevent the addition or re-addition of characters in the future, but by paring the set down now, we require any future changes to pass the high bar of the Swift Evolution process.)</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-detailed-design" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#detailed-design" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Detailed design</h2><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-identifiers" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#identifiers" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Identifiers</h3><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="">Swift identifier characters will&nbsp;<a href="http://unicode.org/reports/tr31/#Conformance" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">conform to UAX #31</a>&nbsp;as follows:</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=""><a href="http://unicode.org/reports/tr31/#C1" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><span style="box-sizing:border-box;font-weight:600" class="">UAX31-C1.</span></a>&nbsp;The conformance described herein refers to the Unicode 9.0.0 version of UAX #31 (dated 2016-05-31 and retrieved 2016-10-09).</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=""><a href="http://unicode.org/reports/tr31/#C2" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><span style="box-sizing:border-box;font-weight:600" class="">UAX31-C2.</span></a>&nbsp;Swift shall observe the following requirements:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:0px" class=""><li style="box-sizing:border-box" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class=""><a href="http://unicode.org/reports/tr31/#R1" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><span style="box-sizing:border-box;font-weight:600" class="">UAX31-R1.</span></a>&nbsp;Swift shall augment the definition of "Default Identifiers" with the following&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">profiles</span>:</p><ol style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:0px;list-style-type:lower-alpha" class=""><li style="box-sizing:border-box" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class=""><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="">ID_Start</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="">ID_Continue</code>&nbsp;shall be used for&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="">Start</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="">Continue</code>&nbsp;(replacing&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="">XID_Start</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="">XID_Continue</code>). This&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">excludes</span>&nbsp;characters in&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="">Other_ID_Start</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="">Other_ID_Continue</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="">_ 005F LOW LINE shall additionally be allowed as a&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="">Start</code>&nbsp;character.</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="">The emoji characters&nbsp;<span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🐶</span>&nbsp;1F436 DOG FACE and&nbsp;<span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🐮</span>&nbsp;1F42E COW FACE shall be allowed as&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="">Start</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="">Continue</code>&nbsp;characters.</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="">(<a href="http://unicode.org/reports/tr31/#R1a" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><span style="box-sizing:border-box;font-weight:600" class="">UAX31-R1a.</span></a>) The join-control characters ZWJ and ZWNJ are strictly limited to the special cases A1, A2, and B described in UAX #31. (This requirement is covered in the&nbsp;<a href="https://github.com/apple/swift-evolution/pull/531" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Normalize Unicode Identifiers proposal</a>.)</p></li></ol></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=""><a href="http://unicode.org/reports/tr31/#R4" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><span style="box-sizing:border-box;font-weight:600" class="">UAX31-R4.</span></a>&nbsp;Swift shall consider two identifiers equivalent when they have the same normalized form under&nbsp;<a href="http://unicode.org/reports/tr15/" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><span style="box-sizing:border-box;font-weight:600" class="">NFC</span></a>. (This requirement is covered in the&nbsp;<a href="https://github.com/apple/swift-evolution/pull/531" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Normalize Unicode Identifiers proposal</a>.)</p></li></ul></li></ul><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=""><a href="http://unicode.org/cldr/utility/unicodeset.jsp?a=%5B%5Ba-zA-Z_%5Cu00A8%5Cu00AA%5Cu00AD%5Cu00AF%5Cu00B2-%5Cu00B5%5Cu00B7-%5Cu00BA%5Cu00BC-%5Cu00BE%5Cu00C0-%5Cu00D6%5Cu00D8-%5Cu00F6%5Cu00F8-%5Cu00FF%5Cu0100-%5Cu02FF%5Cu0370-%5Cu167F%5Cu1681-%5Cu180D%5Cu180F-%5Cu1DBF%5Cu1E00-%5Cu1FFF%5Cu200B-%5Cu200D%5Cu202A-%5Cu202E%5Cu203F-%5Cu2040%5Cu2054%5Cu2060-%5Cu206F%5Cu2070-%5Cu20CF%5Cu2100-%5Cu218F%5Cu2460-%5Cu24FF%5Cu2776-%5Cu2793%5Cu2C00-%5Cu2DFF%5Cu2E80-%5Cu2FFF%5Cu3004-%5Cu3007%5Cu3021-%5Cu302F%5Cu3031-%5Cu303F%5Cu3040-%5CuD7FF%5CuF900-%5CuFD3D%5CuFD40-%5CuFDCF%5CuFDF0-%5CuFE1F%5CuFE30-%5CuFE44%5CuFE47-%5CuFFFD%5CU00010000-%5CU0001FFFD%5CU00020000-%5CU0002FFFD%5CU00030000-%5CU0003FFFD%5CU000E0000-%5CU000EFFFD%5D%5B0-9%5Cu0300-%5Cu036F%5Cu1DC0-%5Cu1DFF%5Cu20D0-%5Cu20FF%5CuFE20-%5CuFE2F%5D%5D&amp;b=%5B%5B:ID_Continue:%5D%5CU0001F436%5CU0001F42E%5D" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">These changes</a>&nbsp;result in the removal of some 5,500 valid code points from the identifier characters, as well as hundreds of thousands of unassigned code points. (Though it does not appear on this <a href="http://unicode.org/" class="">unicode.org</a> utility, which currently supports only Unicode 8 data, the · 00B7 MIDDLE DOT is no longer an identifier character.) Adopting&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="">ID_Start</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="">ID_Continue</code>&nbsp;does not add any new identifier characters.</p><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" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#grammar-changes" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></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="">identifier-head → [:ID_Start:]
identifier-head → _ 🐶 🐮
identifier-character → identifier-head
identifier-character → [:ID_Continue:]
</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-operators" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#operators" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Operators</h3><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="">Swift operator characters will be limited to&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">only</span>&nbsp;the following ASCII characters:</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="">! % &amp; * + - . / &lt; = &gt; ? ^ | ~</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="">The current restrictions on reserved tokens and operators&nbsp;<span style="box-sizing:border-box;font-weight:600" class="">will remain</span>:&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;<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="">-&gt;</code>,&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;<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;<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;<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;<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>, prefix&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>, prefix&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="">&amp;</code>, postfix&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="">&gt;</code>, and postfix&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 reserved.</p><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-dots-in-operators" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#dots-in-operators" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>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" class="gmail-anchor" 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"></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" class="gmail-anchor" 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"></a>Emoji</h3><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="">If adopted, this proposal eliminates emoji from Swift identifiers and operators. Despite their novelty and utility, emoji characters introduce significant challenges to the language:</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="">Their categorization into identifiers and operators is not semantically motivated, and is fraught with discrepancies.</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="">Emoji characters are not displayed consistently and uniformly across different systems and fonts. Including&nbsp;<a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AEmoji%3A%5D" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">all Unicode emoji</a>&nbsp;introduces characters that don't render as emoji on Apple platforms without a variant selector, but which also wouldn't normally be used as identifier characters (e.g. ⏏ ▪ ▫).</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="">Some emoji nearly overlap with existing operator syntax:&nbsp;<span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">❗️</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">❓</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">➕</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">➖</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">➗</span><span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">✖️</span></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="">Full emoji support necessitates handling a variety of use cases for joining characters and variant selectors, which would not otherwise be useful in most cases. It would be hard to avoid permitting sequences of characters which aren't valid emoji, or being overly restrictive and not properly supporting emoji introduced in future versions of Unicode.</p></li></ul><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="">As an exception, in homage to Swift's origins, we permit&nbsp;<span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🐶</span>&nbsp;and&nbsp;<span style="box-sizing:border-box;font-family:&quot;apple color emoji&quot;,&quot;segoe ui&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:21px;line-height:20px;vertical-align:middle;margin-right:0px" class="">🐮</span>&nbsp;in identifiers.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-source-compatibility" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#source-compatibility" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Source compatibility</h2><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 change is source-breaking in cases where developers have incorporated emoji or custom non-ASCII operators, or identifiers with characters which have been disallowed. This is unlikely to be a significant breakage for the majority of serious Swift code.</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="">Code using the middle dot&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;in identifiers may be slightly more common.&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;is now disallowed entirely.</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="">Diagnostics for invalid characters are already produced today. We can improve them easily if needed.</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="">Maintaining source compatibility for Swift 3 should be easy: just keep the old parsing &amp; identifier lookup code.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-effect-on-abi-stability" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#effect-on-abi-stability" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Effect on ABI stability</h2><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 does not affect the ABI format itself, although the&nbsp;<a href="https://github.com/apple/swift-evolution/pull/531" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Normalize Unicode Identifiers proposal</a>&nbsp;affects the ABI of compiled modules.</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="">The standard library will not be affected; it uses ASCII symbols with no combining characters.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-effect-on-api-resilience" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#effect-on-api-resilience" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Effect on API resilience</h2><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 doesn't affect API resilience.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-alternatives-considered" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#alternatives-considered" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Alternatives considered</h2><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="">Define operator characters using Unicode categories such as&nbsp;<a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%5B%3ASm%3A%5D%5B%3ASo%3A%5D%5D" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class=""><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="">Sm</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="">So</code></a>. This approach would include many "non-operator-like" characters and doesn't seem to provide a significant benefit aside from a simpler definition.</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="">Hand-pick a set of "operator-like" characters to include. The proposal authors tried this painstaking approach, and came up with a relatively agreeable set of about&nbsp;<a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%21%5C%24%25%5C%26*%2B%5C-%2F%3C%3D%3E%3F%5C%5E%7C%7E%0D%0A%0D%0A%5Cu00AC%0D%0A%5Cu00B1%0D%0A%5Cu00B7%0D%0A%5Cu00D7%0D%0A%5Cu00F7%0D%0A%0D%0A%5Cu2208-%5Cu220D%0D%0A%5Cu220F-%5Cu2211%0D%0A%5Cu22C0-%5Cu22C3%0D%0A%5Cu2212-%5Cu221D%0D%0A%5Cu2238%0D%0A%5Cu223A%0D%0A%5Cu2240%0D%0A%5Cu228C-%5Cu228E%0D%0A%5Cu2293-%5Cu22A3%0D%0A%5Cu22BA-%5Cu22BD%0D%0A%5Cu22C4-%5Cu22C7%0D%0A%5Cu22C9-%5Cu22CC%0D%0A%5Cu22D2-%5Cu22D3%0D%0A%5Cu2223-%5Cu222A%0D%0A%5Cu2236-%5Cu2237%0D%0A%5Cu2239%0D%0A%5Cu223B-%5Cu223E%0D%0A%5Cu2241-%5Cu228B%0D%0A%5Cu228F-%5Cu2292%0D%0A%5Cu22A6-%5Cu22B9%0D%0A%5Cu22C8%0D%0A%5Cu22CD%0D%0A%5Cu22D0-%5Cu22D1%0D%0A%5Cu22D4-%5Cu22FF%0D%0A%5Cu22CE-%5Cu22CF%0D%0A%0D%0A%5Cu2A00-%5Cu2AFF%0D%0A%0D%0A%5Cu27C2%0D%0A%5Cu27C3%0D%0A%5Cu27C4%0D%0A%5Cu27C7%0D%0A%5Cu27C8%0D%0A%5Cu27C9%0D%0A%5Cu27CA%0D%0A%5Cu27CE-%5Cu27D7%0D%0A%5Cu27DA-%5Cu27DF%0D%0A%5Cu27E0-%5Cu27E5%0D%0A%0D%0A%5Cu29B5-%5Cu29C3%0D%0A%5Cu29C4-%5Cu29C9%0D%0A%5Cu29CA-%5Cu29D0%0D%0A%5Cu29D1-%5Cu29D7%0D%0A%5Cu29DF%0D%0A%5Cu29E1%0D%0A%5Cu29E2%0D%0A%5Cu29E3-%5Cu29E6%0D%0A%5Cu29FA%0D%0A%5Cu29FB%0D%0A%0D%0A%5Cu2308-%5Cu230B%0D%0A%5Cu2336-%5Cu237A%0D%0A%5Cu2395%5D" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">650 code points</a>&nbsp;(although this set would require further refinement), but ultimately felt the motivation for including non-ASCII operators is much lower than for identifiers, and the harm to readers/writers of programs outweighs their potential utility.</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="">Use Normalization Form KC (NFKC) instead of NFC. The decision to use NFC comes from&nbsp;<a href="https://github.com/apple/swift-evolution/pull/531" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Normalize Unicode Identifiers proposal</a>. Also, UAX #31 states:</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)" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">Generally if the programming language has case-sensitive identifiers, then Normalization Form C is appropriate; whereas, if the programming language has case-insensitive identifiers, then Normalization Form KC is more appropriate.</div></blockquote><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">NFKC may also produce surprising results; for example, "ſ" and "s" are equivalent under NFKC.</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="">Continue to allow single&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 in operators, and perhaps even expand the original rule to allow them anywhere (even if the operator does not begin with&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>).</p><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">This would allow a wider variety of custom operators (for some interesting possibilities, see the operators in Haskell's&nbsp;<a href="https://github.com/ekmett/lens/wiki/Operators" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">Lens</a>&nbsp;package). However, there are a handful of potential complications:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:0px" class=""><li style="box-sizing:border-box" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">Combining prefix or postfix operators with member access:&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="">foo*.bar</code>&nbsp;would need to be parsed as&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="">foo *. bar</code>rather than&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="">(foo*).bar</code>. Parentheses could be required to disambiguate.</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="">Combining infix operators with contextual members:&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="">foo*.bar</code>&nbsp;would need to be parsed as&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="">foo *. bar</code>&nbsp;rather than&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="">foo * (.bar)</code>. Whitespace or parentheses could be required to disambiguate.</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="">Hypothetically, if operators were accessible as members such as&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="">MyNumber.+</code>, allowing operators with single&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 would require escaping operator names (perhaps with backticks, such as&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="">MyNumber.`+`</code>).</p></li></ul><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">This would also require operators of the form&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 example&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;<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;<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;<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>) to be reserved, to prevent users from defining custom operators that conflict with member access and optional chaining.</p><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class="">We believe that requiring dots to appear in groups of at least two, while in some ways more restrictive, will prevent a significant amount of future pain, and does not require special-case considerations such as the above.</p></li></ul><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);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-future-directions" class="gmail-anchor" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#future-directions" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1"></a>Future directions</h2><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="">While not within the scope of this proposal, the following considerations may provide useful context for the proposed changes. We encourage the community to pick up these topics when the time is right.</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;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;margin-bottom:0px" class=""><li style="box-sizing:border-box" class=""><p style="box-sizing:border-box;margin-top:16px;margin-bottom:16px" class=""><span style="box-sizing:border-box;font-weight:600" class="">Re-expand operators to allow some non-ASCII characters.</span>&nbsp;There is work in progress to update UAX #31 with definitions for "operator identifiers" — when this work is completed, it would be worth considering for Swift.</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=""><span style="box-sizing:border-box;font-weight:600" class="">Introduce a syntax for method cascades.</span>&nbsp;The Dart language supports&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="">method cascades</a>, whereby multiple methods can be called on an object within one expression:&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="">foo..bar()..baz()</code>&nbsp;effectively performs&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="">foo.bar(); foo.baz()</code>. This syntax can also be used with assignments and subscripts. Such a feature might be very useful in Swift; this proposal reserves 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 so that it may be added in the future.</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=""><span style="box-sizing:border-box;font-weight:600" class="">Introduce "mixfix" operator declarations.</span>&nbsp;Mixfix operators are based on pattern matching, and would allow more than two operands. For example, the ternary operator&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;can be defined as a mixfix operator with three "holes":&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>. Subscripts might be subsumed by mixfix declarations such as&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>. Some holes could be made&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="">@autoclosure</code>, and there might even be holes whose argument is represented as an AST, rather than a value or thunk, supporting advanced metaprogramming (for instance, F#'s&nbsp;<a href="https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/code-quotations" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">code quotations</a>).</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=""><span style="box-sizing:border-box;font-weight:600" class="">Diminish or remove the lexical distinction between operators and identifiers.</span>&nbsp;If precedence and fixity applied to traditional identifiers as well as operators, it would be possible to incorporate ASCII equivalents for standard operators (e.g.&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="">and</code>&nbsp;for&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="">&amp;&amp;</code>, to allow&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="">A and B</code>). If additionally combined with mixfix operator support, this might enable powerful DSLs (for instance, C#'s&nbsp;<a href="https://en.wikipedia.org/wiki/Language_Integrated_Query" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none" class="">LINQ</a>).</p></li></ul></div></div></div></div>
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>