Array-like: an owning value that is usable as an ordered sequence of values with known, finite length which presents an interface that allows for
O(1) (at worst, amortized
O(1)) random access. The length need not be statically-known. Exemplar:
Slice-like: a non-owning reference to a contiguous (non-strict) subset of an array-like value. Exemplar:
[T; n] should be qualified as “fixed-size” rather than
[T] being qualified as “unsized”. That way, the category exemplars are
&[T], rather than
&[T]. This does raise the hairy issue of explaining DST, but then, you have to do that at some point anyway to explain traits.
Also, it should be “borrowed immutable slice” and “borrowed mutable slice” in full, shortened to “slice” and “mutable slice” in practice (to keep people from going mad).
Finally, if there was any logic to the universe,
Vec would be called
Array, but I suppose we’re just going to have to live with it, now. shakes head sadly