@@ -32,7 +32,7 @@ point of transfer.
32
32
[ SE-0302] ( 0302-concurrent-value-and-concurrent-closures.md ) states
33
33
that non-` Sendable ` values cannot be passed across isolation boundaries. The
34
34
following code demonstrates a ` Sendable ` violation when passing a
35
- newly-constructed value into an actor-isolated function:
35
+ newly-initialized value into an actor-isolated function:
36
36
37
37
``` swift
38
38
// Not Sendable
@@ -58,9 +58,9 @@ func openNewAccount(name: String, initialBalance: Double) async {
58
58
59
59
This is overly conservative; the program is safe because:
60
60
61
- * ` client ` does not have access to any non-` Sendable ` state from its constructor
61
+ * ` client ` does not have access to any non-` Sendable ` state from its initializer
62
62
parameters since Strings and Doubles are ` Sendable ` .
63
- * ` client ` just being constructed implies that ` client ` cannot have any uses
63
+ * ` client ` just being initialized implies that ` client ` cannot have any uses
64
64
outside of ` openNewAccount ` .
65
65
* ` client ` is not used within ` openNewAccount ` beyond ` addClient ` .
66
66
@@ -223,7 +223,7 @@ precise regions.
223
223
224
224
Now lets apply these rules to some specific examples in Swift code:
225
225
226
- * ** Initializing a let or var binding** . `` let y = x, var y = x `` . Initializing
226
+ * ** Initializing a ` let ` or ` var ` binding** . `` let y = x, var y = x `` . Initializing
227
227
a let or var binding ` y ` with ` x ` results in ` y ` being in the same region as
228
228
` x ` . This follows from rule ` (2) ` since formally a copy is equivalent to calling a
229
229
function that accepts ` x ` and returns a copy of ` x ` .
@@ -243,7 +243,7 @@ Now lets apply these rules to some specific examples in Swift code:
243
243
change program semantics. A valid program must still obey the no-reuse
244
244
constraints of ` consume ` .
245
245
246
- * ** Assigning a var binding** . `` y = x `` . Assigning a var binding ` y ` with ` x `
246
+ * ** Assigning a ` var ` binding** . `` y = x `` . Assigning a var binding ` y ` with ` x `
247
247
results in ` y ` being in the same region as ` x ` . If ` y ` is not captured by
248
248
reference in a closure, then ` y ` 's previous assigned region is forgotten due
249
249
to ` (3)(b) ` :
@@ -1887,7 +1887,7 @@ func example(_ x: NonSendable) async -> NonSendable? {
1887
1887
}
1888
1888
```
1889
1889
1890
- In the above, the result of ` example ` is a newly constructed value that has no
1890
+ In the above, the result of ` example ` is a newly initialized value that has no
1891
1891
data dependence on the parameter ` x ` , but as laid out in this proposal, we
1892
1892
cannot express this. We propose the addition of a new function parameter
1893
1893
modifier called ` returnsIsolated ` that causes callers to treat the result of a
0 commit comments