While discussing `Span<T>` safety rules with the F# team I realized we
hadn't fully documented our dependency on the shape of the `Span<T>`
API. Added that plus some of the future considerations we discussed for
`Span<T>`.
https://github.com/Microsoft/visualfsharp/pull/4888
This updates the blittable design to reflect the most recent design
meeting on the subject. Summary of the changes:
1. Decided on `unmanaged` over `blittable`: This is the term used by
the spec and prior art (in F#). Additionally `blittable` is actually
a stronger constraint than what we actually need here.
2. Removed the struct declaration section: After further examination
it was decided that forcing existing structs to be annotated with
`unmanaged` before meeting the `unmanaged` constraint would severely
limit the feature. Decided to focus on the constraint here only.
Note: even though we changed the name I still kept the doc as
blittable.md for now to avoid breaking links and keeping doc history.
Incorporate decisions, changes and motivation from various sources, documents and discussions.
The goal is to have all the relevant information in one place and describe the expected behavior of the actual implementation.
Ordinary arrays can be created through the following syntax:
```C#
new int[3]
new int[3] { 1, 2, 3 }
new int[] { 1, 2, 3 }
new[] { 1, 2, 3 }
```
We should allow stack allocated arrays be created through:
```C#
stackalloc int[3] // currently allowed
stackalloc int[3] { 1, 2, 3 }
stackalloc int[] { 1, 2, 3 }
stackalloc[] { 1, 2, 3 }
```
We no longer assume that ` Span<T> span = new Span<T>(ref variable); ` can actually "wrap" the reference to the variable.
This allows to relax some of the safety requirements.