<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="560337681" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/34675" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/34675/hovercard" href="https://github.com/JuliaLang/julia/pull/34675">#34675</a>. It came up that <code class="notranslate">symdiff([1, 2, 3, 2]) == [1, 3]</code> which struck me as... unexpected. I'm opening an issue to discuss whether this is a behavior we actually want.</p>
<p dir="auto">I'm not sure if there's anything we can do about this, but this throws an error:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; (1:2) - (1:2)
ERROR: ArgumentError: step cannot be zero
 in steprange_last at ./range.jl:47
 in - at operators.jl:331"><pre class="notranslate">julia<span class="pl-k">&gt;</span> (<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">2</span>) <span class="pl-k">-</span> (<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">2</span>)
ERROR<span class="pl-k">:</span> ArgumentError<span class="pl-k">:</span> step cannot be zero
 <span class="pl-k">in</span> steprange_last at <span class="pl-k">./</span>range<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">47</span>
 <span class="pl-k">in</span> <span class="pl-k">-</span> at operators<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">331</span></pre></div>
<p dir="auto">This can break code that expects that any two <code class="notranslate">AbstractVector{T&lt;:Number}</code>s of the same length can be subtracted from each other.</p>