Skip to content

Commit 88329b1

Browse files
committed
StorageView -> Span
1 parent 0c6825b commit 88329b1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

proposals/NNNN-non-escapable.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ This complements the `~Copyable` types added with SE-0390 by introducing another
1616

1717
In addition, these types will support lifetime-dependency constraints (being tracked in a separate proposal), that allow them to safely hold pointers referring to data stored in other types.
1818

19-
This feature is a key requirement for the proposed `StorageView` type.
19+
This feature is a key requirement for the proposed `Span` type.
2020

2121
**See Also**
2222

2323
* [SE-0390: Noncopyable structs and enums](https://github.com/apple/swift-evolution/blob/main/proposals/0390-noncopyable-structs-and-enums.md)
2424
* [Language Support for Bufferview](https://forums.swift.org/t/roadmap-language-support-for-bufferview/66211)
2525
* [Roadmap for improving Swift performance predictability: ARC improvements and ownership control](https://forums.swift.org/t/a-roadmap-for-improving-swift-performance-predictability-arc-improvements-and-ownership-control/54206)
2626
* [Ownership Manifesto](https://forums.swift.org/t/manifesto-ownership/5212)
27-
* [Draft StorageView Proposal](https://github.com/apple/swift-evolution/pull/2307)
27+
* [Draft Span Proposal](https://github.com/apple/swift-evolution/pull/2307)
2828
* [Draft Lifetime Dependency Annotations Proposal](https://github.com/apple/swift-evolution/pull/2305)
2929

3030
## Motivation
@@ -305,9 +305,9 @@ Retrofitting existing generic types so they can support both escapable and nones
305305

306306
## Future directions
307307

308-
#### `StorageView` type
308+
#### `Span` type
309309

310-
This proposal is being driven in large part by the needs of the `StorageView` type that has been discussed elsewhere.
310+
This proposal is being driven in large part by the needs of the `Span` type that has been discussed elsewhere.
311311
Briefly, this type would provide an efficient universal “view” of array-like data stored in contiguous memory.
312312
Since values of this type do not own any data but only refer to data stored elsewhere, their lifetime must be limited to not exceed that of the owning storage.
313313
We expect to publish a sample implementation and proposal for that type very soon.
@@ -395,9 +395,9 @@ so it cannot be allowed to contain a nonescapable value.
395395

396396
#### Rely on `~Copyable`
397397

398-
As part of the `StorageView` design, we considered whether it would suffice to use `~Copyable` instead of introducing a new type concept.
399-
Andrew Trick's analysis in [Language Support for Bufferview](https://forums.swift.org/t/roadmap-language-support-for-bufferview/66211) concluded that making `StorageView` be non-copyable would not suffice to provide the full semantics we want for that type.
400-
Further, introducing `StorageView` as `~Copyable` would actually preclude us from later expanding it to be `~Escapable`.
398+
As part of the `Span` design, we considered whether it would suffice to use `~Copyable` instead of introducing a new type concept.
399+
Andrew Trick's analysis in [Language Support for Bufferview](https://forums.swift.org/t/roadmap-language-support-for-bufferview/66211) concluded that making `Span` be non-copyable would not suffice to provide the full semantics we want for that type.
400+
Further, introducing `Span` as `~Copyable` would actually preclude us from later expanding it to be `~Escapable`.
401401

402402
The iterator example in the beginning of this document provides another motivation:
403403
Iterators are routinely copied in order to record a particular point in a collection.

0 commit comments

Comments
 (0)