-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Initial draft for a variadic generics vision document. #1839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
141d3c3
to
d5a3f47
Compare
elements as a pack. This eliminates one of the added meanings of '...' and is more generally useful than tuple splat.
04f8528
to
c75010a
Compare
fc60cba
to
79f0468
Compare
79f0468
to
69c77fa
Compare
|
||
```swift | ||
struct ChainCollection<Element, C...> where C: Collection, C.Element == Element { | ||
var collection: C... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var collection: C... | |
var collections: C... |
(either that or the following should change to reference collection
rather than collections
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I think the reference should say collection
; we're recommending the singular naming convention for packs
Co-authored-by: Sophia Poirier <[email protected]>
Co-authored-by: Sophia Poirier <[email protected]>
I think the essence of this document will be reviewed under the parameter packs proposal, and the rest will be pitched as individual features building on parameter packs (should they be accepted). |
Add an initial vision document for variadic generics in Swift.
Please leave editorial reviews on this PR! For feedback on the language design, please leave a comment on the Swift evolution discussion thread.