<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>We need a token to be unambiguously an operator or identifier - we can have different rules for the leading and subsequent characters though.<br><br><div>-Chris</div></div><div><br>On Jan 3, 2016, at 6:02 PM, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com">jtbandes@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Is it considered infeasible for any characters to be allowed in both identifiers and operators?<div class="gmail_extra">
<br><div class="gmail_quote">On Sun, Jan 3, 2016 at 1:23 PM, Chris Lattner via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Jan 2, 2016, at 11:53 PM, Brent Royal-Gordon via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Swift currently does not allow operators to use $ - I assume because the grammar reserves it in one place: `implicit-parameter-name`.&nbsp; I don't see why an entire class of identifiers has been eliminated, so I propose $ instead be reclassified as an `operator-character` so it can be used mixed in with other such characters, but prevents the introduction of `$Identifier`-style declarations that might conflict with implicit parameters.<br>
&gt;<br>
&gt; I believe the reason you don't see any other $ variables is that they're reserved for the debugger and REPL.<br>
&gt;<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;brent@Brents-MacBook-Pro ~/D/Code&gt; swift<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;Welcome to Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81). Type :help for assistance.<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&gt; "foo"<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;$R0: String = "foo"<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2&gt; print($R0)<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;foo<br>
<br>
</span>Right.&nbsp; That said, 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.<br>
<br>
-Chris<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</div></div></blockquote></div><br></div></div>
</div></blockquote></body></html>