<div dir="ltr"><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;color:rgb(51,51,51);background-color:rgba(0,0,0,0.0392157)">&amp;</code><span style="color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;line-height:25.6px"> (as a prefix operator), </span><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;color:rgb(51,51,51);background-color:rgba(0,0,0,0.0392157)">-&gt;</code><span style="color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;line-height:25.6px">, </span><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;color:rgb(51,51,51);background-color:rgba(0,0,0,0.0392157)">?</code><span style="color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;line-height:25.6px">, and </span><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;color:rgb(51,51,51);background-color:rgba(0,0,0,0.0392157)">!</code><span style="color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;line-height:25.6px"> (as a postfix operator)</span><br><div><br></div><div>This is the list of built-ins that look like operators, but are banned from use as Swift custom operators.</div><div><br></div><div>We can review that list.</div><div><br></div><div>`&amp;` reserved as a prefix operators for a reason. It marks a variable use as `inout`, which currently cannot be done by any Swift operator function.</div><div><br></div><div>Other three don&#39;t have such justification.</div><div><br></div><div>`-&gt;`, `?` and `!` are used in types, but they are mostly unambiguous in expressions.</div><div><br></div><div>The only use of `!` in expressions can be rewitten as a built-in operator function:</div><div>postfix func ! &lt;T&gt; (left: T!) -&gt; T</div><div><br></div><div>`?` is used in optional method calls:</div><div>a.method?(b)</div><div>A parallel proposal is going to remove such syntax from Swift, so this will not be a problem.</div><div><br></div><div>`?` is also used in patterns:</div><div>if case x? = optional { ... }</div><div><br></div><div>Such use is also unambigious here, as expressions are not allowed in patterns.</div><div><br></div><div>So my proposal is to allow `-&gt;`, `?` and potfix `!` as custom operators.</div><div>This proposal requires proposal of removing optional protocol requirements.</div></div>