The document doesn't explicitely mention the implications of range indexing for arrays (that are used in examples): that it creates a subarray that's a copy and not just a view (slice) while the used language creates subrange IMO hints that it's creating the latter.
This is further worsened by one of the examples Span<int> x_y = numbers[x..y]; that suggests the idea that in this case a Slice is returned. But in reality a subarray (i.e. copy) is returned and then it's implicitly converted to Span.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The document doesn't explicitely mention the implications of range indexing for arrays (that are used in examples): that it creates a subarray that's a copy and not just a view (slice) while the used language
creates subrangeIMO hints that it's creating the latter.This is further worsened by one of the examples
Span<int> x_y = numbers[x..y];that suggests the idea that in this case a Slice is returned. But in reality a subarray (i.e. copy) is returned and then it's implicitly converted toSpan.Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.