<p dir="auto">Would it make sense to define <code class="notranslate">Base.iterate(::Nothing) = nothing</code> ?</p>
<p dir="auto">HTTP.jl has a generic interface that accepts anything iterable.<br>
A user has reported <code class="notranslate">method matching iterate(::Nothing)</code> when they passed <code class="notranslate">nothing</code>.</p>
<p dir="auto">It seems that <code class="notranslate">eltype</code> is already defined.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; eltype(nothing)
Any"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">eltype</span>(<span class="pl-c1">nothing</span>)
Any</pre></div>
<p dir="auto">But, <code class="notranslate">HasEltype</code>, <code class="notranslate">HasShape</code> and <code class="notranslate">HasLength</code> are not.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; setdiff!([1, 2, nothing], nothing)
ERROR: MethodError: no method matching start(::Nothing)
Closest candidates are:
  start(::Core.SimpleVector) at essentials.jl:533
  start(::Base.MethodList) at reflection.jl:684
  start(::ExponentialBackOff) at error.jl:170
  ...
Stacktrace:
 [1] mapfoldl(::Function, ::Function, ::Set{Union{Nothing, Int64}}, ::Nothing) at ./reduce.jl:59
 [2] foldl at ./reduce.jl:90 [inlined]
 [3] setdiff! at ./abstractset.jl:149 [inlined]
 [4] _shrink! at ./array.jl:2338 [inlined]
 [5] setdiff!(::Array{Union{Nothing, Int64},1}, ::Nothing) at ./array.jl:2343
 [6] top-level scope"><pre class="notranslate"><code class="notranslate">julia&gt; setdiff!([1, 2, nothing], nothing)
ERROR: MethodError: no method matching start(::Nothing)
Closest candidates are:
  start(::Core.SimpleVector) at essentials.jl:533
  start(::Base.MethodList) at reflection.jl:684
  start(::ExponentialBackOff) at error.jl:170
  ...
Stacktrace:
 [1] mapfoldl(::Function, ::Function, ::Set{Union{Nothing, Int64}}, ::Nothing) at ./reduce.jl:59
 [2] foldl at ./reduce.jl:90 [inlined]
 [3] setdiff! at ./abstractset.jl:149 [inlined]
 [4] _shrink! at ./array.jl:2338 [inlined]
 [5] setdiff!(::Array{Union{Nothing, Int64},1}, ::Nothing) at ./array.jl:2343
 [6] top-level scope
</code></pre></div>
<p dir="auto">Needs an implementation of:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="start(::Nothing)"><pre class="notranslate"><code class="notranslate">start(::Nothing)
</code></pre></div>
<p dir="auto">and a test.</p>