<p dir="auto">This doesn't seem right:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; [1][begin:end]
1-element Vector{Int64}:
 1

julia&gt; @less [1][begin:end]
ERROR: UndefVarError: begin not defined
Stacktrace:
 [1] top-level scope
   @ REPL[16]:1"><pre class="notranslate">julia<span class="pl-k">&gt;</span> [<span class="pl-c1">1</span>][<span class="pl-c1">begin</span><span class="pl-k">:</span><span class="pl-c1">end</span>]
<span class="pl-c1">1</span><span class="pl-k">-</span>element Vector{Int64}<span class="pl-k">:</span>
 <span class="pl-c1">1</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">@less</span> [<span class="pl-c1">1</span>][<span class="pl-c1">begin</span><span class="pl-k">:</span><span class="pl-c1">end</span>]
ERROR<span class="pl-k">:</span> UndefVarError<span class="pl-k">:</span> <span class="pl-k">begin</span> not defined
Stacktrace<span class="pl-k">:</span>
 [<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope
   @ REPL[<span class="pl-c1">16</span>]<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div>
<p dir="auto">Julia 1.6.1</p>
<p dir="auto">This would be heavily breaking, so definitely not a 1.x thing, but it has come up (I can't recall where but perhaps <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JeffBezanson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JeffBezanson">@JeffBezanson</a> can link) that comparing unrelated objects with <code class="notranslate">==</code> can hide bugs in situations where it doesn't make sense to compare two objects. In static languages, this will typically be a type error, whereas dynamic languages have traditionally been quite liberal with what can be compared for equality since it's often useful to be able to check whether two objects are the same object, for example, or to have heterogenous collections like dicts where equality is used to compare very different kinds of objects sometimes. The best practice in Julia for such situations, however, is to use <code class="notranslate">===</code> for comparing object identity when you want the strict comparison and <code class="notranslate">isequal</code> to compare objects in collections where you need an intuitive equivalence relation. That actually leaves us in the position to remove the <code class="notranslate">x == y</code> fallback that calls <code class="notranslate">x === y</code> and make <code class="notranslate">==</code> fail unless there's an explicit method for the comparison. Any case where <code class="notranslate">x == y</code> was previously being used to compare disparate objects would then have to changed to using <code class="notranslate">===</code> or <code class="notranslate">isequal</code> as appropriate.</p>