Skip to content

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

Closed
wants to merge 14 commits into from

Conversation

hborla
Copy link
Member

@hborla hborla commented Nov 8, 2022

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.

@hborla hborla force-pushed the variadic-generics-vision branch from 141d3c3 to d5a3f47 Compare November 8, 2022 21:15
@hborla hborla force-pushed the variadic-generics-vision branch from 04f8528 to c75010a Compare November 8, 2022 23:23
@hborla hborla marked this pull request as ready for review November 9, 2022 03:24
@hborla hborla force-pushed the variadic-generics-vision branch 2 times, most recently from fc60cba to 79f0468 Compare November 10, 2022 00:33
@hborla hborla force-pushed the variadic-generics-vision branch from 79f0468 to 69c77fa Compare November 10, 2022 01:08
@rjmccall rjmccall mentioned this pull request Jan 9, 2023

```swift
struct ChainCollection<Element, C...> where C: Collection, C.Element == Element {
var collection: C...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var collection: C...
var collections: C...

(either that or the following should change to reference collection rather than collections.)

Copy link
Member Author

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

@hborla
Copy link
Member Author

hborla commented Feb 20, 2023

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).

@hborla hborla closed this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants