<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">In that case it was because $ was not allowed in operators. &nbsp;Here it’s just not allowed at all!</div><div class=""><br class=""></div><div class="">Nevertheless, the irony is delicious,</div><div class=""><br class=""></div><div class="">~Robert Widmann</div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 22, 2016, at 2:05 AM, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com" class="">jtbandes@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">On Sun, Sep 18, 2016 at 6:34 PM, Robert Widmann<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:devteam.codafi@gmail.com" target="_blank" class="">devteam.codafi@gmail.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">Some thoughts</div><br class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class="">On Sep 18, 2016, at 3:33 PM, Jacob Bandes-Storch via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><b class="">TL;DR:</b></div><div class=""><br class=""></div><div class="">Swift 4 Stage 1 seeks to prioritize "Source stability features". Most source-breaking changes were done with in Swift 3; however, the categorization of Unicode characters into identifiers &amp; operators was never thoroughly discussed on swift-evolution. This seems like it might be our last chance, and I think there are some big improvements to be had.</div><div class=""><br class=""></div><div class="">I've gathered some information+thoughts into an early-stage pitch / pre-proposal. It doesn't really have a conclusion, so I'm hoping we can discuss these issues and come up with good (pragmatic) solutions here. I imagine this can morph into a proposal later.</div><div class=""><br class=""></div><div class="">You can read the following in nicer HTML form at&nbsp;<a href="https://gist.github.com/jtbandes/c0b0c072181dcd22c3147802025d0b59" target="_blank" class="">https://gist.github.com/<wbr class="">jtbandes/<wbr class="">c0b0c072181dcd22c3147802025d0b<wbr class="">59</a></div><div class=""><br class="">I look forward to the discussion!<br class=""></div><div class=""><br class=""></div><div class="">-Jacob</div><div class=""><font size="4" class=""><br class=""></font></div><div class=""><b class=""><font size="4" class=""># Background and motivation</font></b></div><div class=""><br class=""></div><div class="">To ease lexing/parsing and avoid user confusion, the names of custom identifiers (type names, variable names, etc.) and operators in Swift can be composed of (mostly) separate sets of characters.</div><div class=""><br class=""></div><div class="">Using terminology from TSPL:</div><div class=""><br class=""></div><div class="">`identifier-head`/`operator-<wbr class="">head` are characters which can<span class="Apple-converted-space">&nbsp;</span><i class="">begin&nbsp;</i>an identifier or operator.</div><div class=""><br class=""></div><div class="">`identifier-character`/`<wbr class="">operator-character` are characters which can appear anywhere in an identifier or operator (these are supersets of the `-head` sets).</div><div class=""><br class=""></div><div class="">&lt;<a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html" target="_blank" class="">https://developer.apple.com/<wbr class="">library/content/documentation/<wbr class="">Swift/Conceptual/Swift_<wbr class="">Programming_Language/<wbr class="">LexicalStructure.html</a>&gt;</div><div class=""><br class=""></div><div class="">(Note also that some particular arrangements of characters are reserved; for instance, `$` followed by digits for an implicit closure parameter, and "If an operator doesn’t begin with a dot, it can’t contain a dot elsewhere." There are also special characters in the language which are neither identifiers nor operators, such as: `()[]{},:@#`)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">## Prior discussion on swift-evolution</b></div><div class=""><br class=""></div><div class=""><b class="">"Request to add middle dot (U+00B7) as operator character?"</b></div><div class="">&lt;<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151214/003176.html" target="_blank" class="">https://lists.swift.org/<wbr class="">pipermail/swift-evolution/<wbr class="">Week-of-Mon-20151214/003176.<wbr class="">html</a>&gt;</div><div class=""><br class=""></div><div class=""><b class="">"Free the '$' Symbol!"</b></div><div class="">&lt;<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/005133.html" target="_blank" class="">https://lists.swift.org/<wbr class="">pipermail/swift-evolution/<wbr class="">Week-of-Mon-20151228/005133.<wbr class="">html</a>&gt;</div><div class=""><br class=""></div><div class=""><b class="">"Proposal: Allow Single Dollar Sign as Valid Identifier"</b></div><div class="">&lt;<a href="https://github.com/apple/swift-evolution/pull/354" target="_blank" class="">https://github.com/apple/<wbr class="">swift-evolution/pull/354</a>&gt;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Chris Lattner has said:</div><div class=""><br class=""></div><div class="">&gt; "...our current operator space (particularly the unicode segments covered) is not super well considered.&nbsp; It would be great for someone to take a more systematic pass over them to rationalize things."</div><div class=""><br class=""></div><div class="">&gt; "We need a token to be unambiguously an operator or identifier - we can have different rules for the leading and subsequent characters though."</div><div class=""><br class=""></div></div></div></div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">I feel a bit bad having implemented the patch that banned this - it feels like dollar was mistakenly left out of the operator character range considering how well it worked in operators up to then.&nbsp; Disambiguation with respect to other language constructs (anonymous parameters in closures and LLDB variables) is trivial and we already had diagnostics about it.</div></div></div></blockquote><div class=""><br class=""></div><div class="">But more importantly, you were also the one who first asked for it to be an operator character :-) &nbsp;<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/005133.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/005133.html</a></div><div class=""><br class=""></div><div class="">Did you have a formal proposal in the works for this? If so, it might be worth reviewing separately from any other changes. $ is a more well-known character, and probably more likely to elicit opinions than some more obscure Unicode stuff.</div></div></div></div></div></blockquote></div><br class=""></body></html>