[Accepted] SE-0408: Pack Iteration

Hello Swift community.

The review of SE-0408 "Pack Iteration" ran from September 6...19, 2023. The proposal is accepted.

Feedback was overwhelmingly positive.

Several reviewers noted that the proposal does not provide a mechanism for creating or initializing a parameter pack by iterating over an existing pack. The Language Steering Group felt that this limitation could be reasonable addressed with future work, and should not delay the introduction of the simple package iteration in this proposal.

I'd like thank you all for participating in the evolution process.

Doug Gregor
Review Manager

19 Likes
func == <each Element: Equatable>(lhs: (repeat each Element), rhs: (repeat each Element)) -> Bool {

 for (left, right) in repeat (each lhs, each rhs) {
   guard left == right else { return false }
 }
 return true
}

By any chance does anyone know if we plan to ship this == implementation in 6.0… or should engineers leveraging pack equality expect to need to "roll their own" equality operator? Thanks!