Skip to content

Commit e95c673

Browse files
committed
tweak wording
1 parent d81bfb7 commit e95c673

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

proposals/NNNN-buffer-pointer-initialization.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ but we only have the following:
7070
- `func initialize<S: Sequence>(from source: S) -> (S.Iterator, Index)`
7171
- `func assign(repeating repeatedValue: Element)`
7272

73-
Missing are methods to assign from a `Sequence` or a `Collection`,
73+
Missing are methods to update memory from a `Sequence` or a `Collection`,
7474
move elements from another `UnsafeMutableBufferPointer`,
7575
modify the initialization state of a range of memory for a particular index of the buffer,
7676
or to deinitialize (at all).
@@ -147,10 +147,11 @@ they include no preconditions beyond having a valid `Collection` and valid buffe
147147
with the understanding that if a user wishes stricter behaviour,
148148
they can compose it from these functions.
149149

150-
The above changes include a method to assign a single element.
150+
The above changes include a method to update a single element.
151151
Evidently that is a synonym for the `subscript(_ i: Index)` setter.
152-
We hope that documenting the assignment action specifically will help clarify the requirements of that action,
153-
which are evidently muddled when documented along with the subscript getter.
152+
We hope that documenting the update action specifically will help clarify the requirements of that action which,
153+
as experience shows, get muddled when documented along with the subscript getter.
154+
154155
Similarly, we propose adding to `UnsafeMutablePointer` and `UnsafeMutableRawPointer`:
155156
```swift
156157
extension UnsafeMutablePointer {

0 commit comments

Comments
 (0)