Skip to content

Propose Pack Destructuring & Pack Splitting #2796

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Remy Demarest <[email protected]>
  • Loading branch information
OguzYuuksel and PsychoH13 authored Apr 19, 2025
commit d50227827e461ae56c6277739d2debf0798fef73
1 change: 1 addition & 0 deletions proposals/NNNN-pack-destructuring-and-pack-splitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Authors: Oguz Yuksel
* Review Manager: TBD
* Status: Draft
* Review: ([pitch](https://forums.swift.org/t/pitch-pack-destructuring-pack-splitting/79388))

## Introduction
Swift’s variadic generics story (SE‑0393 “Parameter Packs” and SE‑0408 “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:
Expand Down