You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/NNNN-non-escapable.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ This complements the `~Copyable` types added with SE-0390 by introducing another
16
16
17
17
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.
18
18
19
-
This feature is a key requirement for the proposed `StorageView` type.
19
+
This feature is a key requirement for the proposed `Span` type.
20
20
21
21
**See Also**
22
22
23
23
*[SE-0390: Noncopyable structs and enums](https://github.com/apple/swift-evolution/blob/main/proposals/0390-noncopyable-structs-and-enums.md)
24
24
*[Language Support for Bufferview](https://forums.swift.org/t/roadmap-language-support-for-bufferview/66211)
25
25
*[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)
@@ -305,9 +305,9 @@ Retrofitting existing generic types so they can support both escapable and nones
305
305
306
306
## Future directions
307
307
308
-
#### `StorageView` type
308
+
#### `Span` type
309
309
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.
311
311
Briefly, this type would provide an efficient universal “view” of array-like data stored in contiguous memory.
312
312
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.
313
313
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.
395
395
396
396
#### Rely on `~Copyable`
397
397
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`.
401
401
402
402
The iterator example in the beginning of this document provides another motivation:
403
403
Iterators are routinely copied in order to record a particular point in a collection.
0 commit comments