Skip to content

Commit 4db549b

Browse files
[SE-0341] Update toolchain and example code (#1543)
1 parent 73f614e commit 4db549b

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

proposals/0341-opaque-parameters.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
* Proposal: [SE-0341](0341-opaque-parameters.md)
44
* Author: [Doug Gregor](https://github.com/DougGregor)
55
* Review Manager: [Ben Cohen](https://github.com/AirspeedSwift)
6-
* Status: **Active Review (3-14 Feb 2022)**
7-
8-
* Implementation: [apple/swift#40993](https://github.com/apple/swift/pull/40993) with the flag `-Xfrontend -enable-experimental-opaque-parameters`, [Linux toolchain](https://download.swift.org/tmp/pull-request/40993/798/ubuntu20.04/swift-PR-40993-798-ubuntu20.04.tar.gz), [macOS toolchain](https://ci.swift.org/job/swift-PR-toolchain-osx/1315/artifact/branch-main/swift-PR-40993-1315-osx.tar.gz)
6+
* Status: **Active Review (3-14 February 2022)**
7+
* Implementation: [apple/swift#40993](https://github.com/apple/swift/pull/40993) with the flag `-Xfrontend -enable-experimental-opaque-parameters`, [Linux toolchain](https://download.swift.org/tmp/pull-request/40993/798/ubuntu20.04/swift-PR-40993-798-ubuntu20.04.tar.gz), [macOS toolchain](https://www.swift.org/download/#snapshots)
98

109
## Introduction
1110

@@ -149,17 +148,17 @@ This feature is purely syntactic sugar, and one can switch between using opaque
149148

150149
## Future Directions
151150

152-
This proposal composes well with idea that allows the use of generic syntax to specify the associated type of a protocol, e.g., where `Collection<String>`is "a `Collection` whose `Element` type is `String`". Combined with this proposal, one can more easily express a function that takes an arbitrary collection of strings:
151+
This proposal composes well with an idea that allows the use of generic syntax to specify the associated type of a protocol, e.g., where `Collection<String>`is "a `Collection` whose `Element` type is `String`". Combined with this proposal, one can more easily express a function that takes an arbitrary collection of strings:
153152

154153
```swift
155154
func takeStrings(_: some Collection<String>) { ... }
156155
```
157156

158157
Recall the complicated `eagerConcatenate` example from the introduction:
159158

160-
```func eagerConcatenate<Sequence1: Sequence, Sequence2: Sequence>(
159+
```swift
161160
func eagerConcatenate<Sequence1: Sequence, Sequence2: Sequence>(
162-
_ sequence1: Sequence1, _ sequence2: Sequence2
161+
_ sequence1: Sequence1, _ sequence2: Sequence2
163162
) -> [Sequence1.Element] where Sequence1.Element == Sequence2.Element
164163
```
165164

@@ -178,10 +177,3 @@ func lazyConcatenate<T>(
178177
_ sequence1: some Sequence<T>, _ sequence2: some Sequence<T>
179178
) -> some Sequence<T>
180179
```
181-
182-
## Acknowledgments
183-
184-
If significant changes or improvements suggested by members of the
185-
community were incorporated into the proposal as it developed, take a
186-
moment here to thank them for their contributions. Swift evolution is a
187-
collaborative process, and everyone's input should receive recognition!

0 commit comments

Comments
 (0)