<p dir="auto">Prompted by this deprecation warning:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Warning: In the future `findall(A)` will only work on boolean collections. Use `findall(x-&gt;x!=0, A)` instead."><pre class="notranslate"><code class="notranslate"> Warning: In the future `findall(A)` will only work on boolean collections. Use `findall(x-&gt;x!=0, A)` instead.
</code></pre></div>
<p dir="auto">I decided to do a (n admittedly worst-case) test: <code class="notranslate">A = rand(10_000, 10_000);</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @time u = findall(x-&gt;x != 0, A);            # this assumes 0 = zero(eltype(A))
  8.606016 seconds (65.73 k allocations: 260.716 MiB, 2.96% gc time)

julia&gt; @time v = findall(!iszero, A);
 12.464981 seconds (40 allocations: 1.531 GiB, 4.27% gc time)

julia&gt; @time w = findall((!iszero).(A));
  1.531174 seconds (23 allocations: 1.502 GiB, 12.50% gc time)

julia&gt; u == v == w
true"><pre class="notranslate"><code class="notranslate">julia&gt; @time u = findall(x-&gt;x != 0, A);            # this assumes 0 = zero(eltype(A))
  8.606016 seconds (65.73 k allocations: 260.716 MiB, 2.96% gc time)

julia&gt; @time v = findall(!iszero, A);
 12.464981 seconds (40 allocations: 1.531 GiB, 4.27% gc time)

julia&gt; @time w = findall((!iszero).(A));
  1.531174 seconds (23 allocations: 1.502 GiB, 12.50% gc time)

julia&gt; u == v == w
true
</code></pre></div>
<p dir="auto">Had I taken the recommended approach, I would've run into a pretty bad performance regression. As it stands, the best (time) performing approach is among the worst in memory usage; the recommended approach with the anonymous function is bad in time but best in memory, and the negative function is worst in both.</p>
<p dir="auto">Example:</p>
<p dir="auto">This is printing ARGS / args at the start of <code class="notranslate">process_options</code> in <code class="notranslate">client.jl</code>.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
julia&gt; test = &quot;$JULIA_HOME/julia&quot;
&quot;/Users/jacobbolewski/Julia/julia/usr/bin/julia&quot;

julia&gt; run(`$test --code-coverage=none -e &quot;exit(0)&quot;`)
args = UTF8String[&quot;-e&quot;,&quot;exit(0)&quot;]
ARGS = UTF8String[&quot;-e&quot;,&quot;exit(0)&quot;]

julia&gt; run(`$test --code_coverage=none -e &quot;exit(0)&quot;`)
args = UTF8String[&quot;--code_coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]
ARGS = UTF8String[&quot;--code_coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]
ERROR: unknown option: --code_coverage=none
 in process_options at ./client.jl:321
 in _start at ./client.jl:401

ERROR: failed process: Process(`/Users/jacobbolewski/Julia/julia/usr/bin/julia --code_coverage=none -e exit(0)`, ProcessExited(1)) [1]
 in run at /Users/jacobbolewski/Julia/julia/usr/lib/julia/sys.dylib

julia&gt; run(`$test --color=no --code-coverage=none -e &quot;exit(0)&quot;`)
args = UTF8String[&quot;--code-coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]
ARGS = UTF8String[&quot;--code-coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]

julia&gt; run(`$test --color=yes -e &quot;exit(0)&quot;`)
args = UTF8String[&quot;--color=yes&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]
ARGS = UTF8String[&quot;--color=yes&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]"><pre class="notranslate">julia<span class="pl-k">&gt;</span> test <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-v">$JULIA_HOME</span>/julia<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>/Users/jacobbolewski/Julia/julia/usr/bin/julia<span class="pl-pds">"</span></span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --code-coverage=none -e "exit(0)"<span class="pl-pds">`</span></span>)
args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]
<span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]

julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --code_coverage=none -e "exit(0)"<span class="pl-pds">`</span></span>)
args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code_coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]
<span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code_coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]
ERROR<span class="pl-k">:</span> unknown option<span class="pl-k">:</span> <span class="pl-k">--</span>code_coverage<span class="pl-k">=</span>none
 <span class="pl-k">in</span> process_options at <span class="pl-k">./</span>client<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">321</span>
 <span class="pl-k">in</span> _start at <span class="pl-k">./</span>client<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">401</span>

ERROR<span class="pl-k">:</span> failed process<span class="pl-k">:</span> <span class="pl-c1">Process</span>(<span class="pl-s"><span class="pl-pds">`</span>/Users/jacobbolewski/Julia/julia/usr/bin/julia --code_coverage=none -e exit(0)<span class="pl-pds">`</span></span>, <span class="pl-c1">ProcessExited</span>(<span class="pl-c1">1</span>)) [<span class="pl-c1">1</span>]
 <span class="pl-k">in</span> run at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jacobbolewski<span class="pl-k">/</span>Julia<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">/</span>julia<span class="pl-k">/</span>sys<span class="pl-k">.</span>dylib

julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --color=no --code-coverage=none -e "exit(0)"<span class="pl-pds">`</span></span>)
args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code-coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]
<span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code-coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]

julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --color=yes -e "exit(0)"<span class="pl-pds">`</span></span>)
args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--color=yes<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]
<span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--color=yes<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]</pre></div>
<p dir="auto">I can start digging around, but does anyone have ideas?</p>