<p dir="auto">I don't see what useful purpose is served by having this distinction in the type system, introduced by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5318547" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/987" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/987/hovercard" href="https://github.com/JuliaLang/julia/issues/987">#987</a> (and see also the discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="27554357" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/5810" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/5810/hovercard" href="https://github.com/JuliaLang/julia/pull/5810">#5810</a>).    According to the description in the manual:</p>
<blockquote>
<p dir="auto">The AbstractArray type includes anything vaguely array-like, and implementations of it might be quite different from conventional arrays. For example, elements might be computed on request rather than stored. Or, it might not be possible to assign or access every array location.</p>
<p dir="auto">StoredArray is an abstract subtype of AbstractArray intended to include all arrays that behave like memories: all elements are independent, can be accessed, and (for mutable arrays) all elements can be assigned.</p>
</blockquote>
<p dir="auto">the main difference between a <code class="notranslate">StoredArray</code> and an <code class="notranslate">AbstractArray</code> is that in the latter, the elements are computed or requested on the fly whereas in the former they are "stored".   But this seems like an implementation detail.... why do we want to have this distinction in the type system?   Under what circumstances would you dispatch on the difference between computed and stored values?</p>
<p dir="auto">The other difference is that, in an <code class="notranslate">AbstractArray</code>, not all elements may be accessible.  (But in this case, shouldn't it be an <code class="notranslate">Associative</code> type?)   If you can't even access all elements, what non-trivial array-like methods could possibly operate on an <code class="notranslate">AbstractArray</code>?   And if you can't write a non-trivial method for it, why even have the type at all?</p>
<p dir="auto">My suggestion would be to just drop this distinction, and make <code class="notranslate">StoredArray === AbstractArray</code>.   And suggest that every concrete <code class="notranslate">AbstractArray</code> type should, at minimum, provide <code class="notranslate">size</code> and <code class="notranslate">getindex</code> (and <code class="notranslate">setindex!</code> if it is mutable), including a single-index variant.</p>
<p dir="auto">E.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="      From worker 4:	Internal error: encountered unexpected error during compilation of undeclared_ceil:
      From worker 4:	ErrorException(&quot;Failed to parse LLVM Assembly: 
      From worker 4:	julia: llvmcall:3:18: error: use of undefined value '@llvm.ceil.f64'
      From worker 4:	%2 = call double @llvm.ceil.f64(double %0)
      From worker 4:	                 ^
      From worker 4:	&quot;)
      From worker 4:	jl_error at /buildworker/worker/package_linux64/build/src/rtutils.c:41
      From worker 4:	emit_llvmcall at /buildworker/worker/package_linux64/build/src/ccall.cpp:997"><pre class="notranslate"><code class="notranslate">      From worker 4:	Internal error: encountered unexpected error during compilation of undeclared_ceil:
      From worker 4:	ErrorException("Failed to parse LLVM Assembly: 
      From worker 4:	julia: llvmcall:3:18: error: use of undefined value '@llvm.ceil.f64'
      From worker 4:	%2 = call double @llvm.ceil.f64(double %0)
      From worker 4:	                 ^
      From worker 4:	")
      From worker 4:	jl_error at /buildworker/worker/package_linux64/build/src/rtutils.c:41
      From worker 4:	emit_llvmcall at /buildworker/worker/package_linux64/build/src/ccall.cpp:997
</code></pre></div>
<p dir="auto">in recent CI runs.</p>