<p dir="auto">I noticed that compound assignment won't work with certain operators, like |&gt; and ∘.</p>
<p dir="auto">For example, the following code gives the error "ERROR: syntax: unexpected "="" on line 2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a = 2
a |&gt;= exp "><pre class="notranslate"><code class="notranslate">a = 2
a |&gt;= exp 
</code></pre></div>
<p dir="auto">But if I say, redefine the * operator as |&gt;, it works perfectly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Base.*
* = |&gt;
a = 2
a *= exp"><pre class="notranslate"><code class="notranslate">import Base.*
* = |&gt;
a = 2
a *= exp
</code></pre></div>
<p dir="auto">outputs 7.389, as it should. The same thing happens with the function composition operator. So clearly the language is able to do this, the parser just doesn't handle it properly with all operators. I tried this in both 0.6.4 and 0.7 and got the same results. Is there some deeper reason why this doesn't currently work?</p>
<p dir="auto">Only a subset of available operators allow the shorthand <code class="notranslate">OPERATOR=</code> notation. I think the current situation is that only ASCII operators are covered.<br>
e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; a ×= b
ERROR: syntax: unexpected &quot;=&quot;
 in eval(::Module, ::Any) at ./boot.jl:236"><pre class="notranslate"><code class="notranslate">julia&gt; a ×= b
ERROR: syntax: unexpected "="
 in eval(::Module, ::Any) at ./boot.jl:236
</code></pre></div>
<p dir="auto">I think it would be reasonable if all operators which allow binary infix syntax would also allow the shorthand. (This came up when I defined a custom <code class="notranslate">⊗</code> operator.)</p>