Propose Pack Destructuring & Pack Splitting#2796
Propose Pack Destructuring & Pack Splitting#2796OguzYuuksel wants to merge 4 commits intoswiftlang:mainfrom
Conversation
8182b62 to
91eab4b
Compare
| * Status: Draft | ||
|
|
||
| ## Introduction | ||
| Swift’s variadic generics story (SE‑0393 “Parameter Packs” and SE‑0404 “Pack Iteration”) unlocks powerful abstractions over arbitrary arities. However, two missing features—recursive decomposition of packs in patterns and split‑expansion of packs at call sites—force library authors into brittle workarounds like fixed‑arity overloads or type erasure. This proposal completes the variadic‑generic toolbox by introducing: |
There was a problem hiding this comment.
| Swift’s variadic generics story (SE‑0393 “Parameter Packs” and SE‑0404 “Pack Iteration”) unlocks powerful abstractions over arbitrary arities. However, two missing features—recursive decomposition of packs in patterns and split‑expansion of packs at call sites—force library authors into brittle workarounds like fixed‑arity overloads or type erasure. This proposal completes the variadic‑generic toolbox by introducing: | |
| Swift’s variadic generics story ([SE‑0393 “Parameter Packs”](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0393-parameter-packs.md) and [SE‑0408 “Pack Iteration”](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0408-pack-iteration.md)) unlocks powerful abstractions over arbitrary arities. However, two missing features—recursive decomposition of packs in patterns and split‑expansion of packs at call sites—force library authors into brittle workarounds like fixed‑arity overloads or type erasure. This proposal completes the variadic‑generic toolbox by introducing: |
There was a problem hiding this comment.
Apologies, @PsychoH13 . I unintentionally performed a force update without reviewing your suggestions. Could you please resubmit them?
deb3046 to
b544739
Compare
Co-authored-by: Remy Demarest <remy.demarest@icloud.com>
|
Hi, Oguz. This is an interesting proposal. It's likely to have quite a complex implementation, though. Are you planning to work on that? |
|
Hi @rjmccall, |
|
Well, I don't mind leaving this PR open if you're really planning to work on an implementation. I just want to make sure you aren't surprised if the proposal doesn't move forward in the meantime; we can't review it if there isn't at least a passable implementation. |
No description provided.