[swift-evolution] [Pitch] Tuple Destructuring in Parameter Lists

Chris Lattner clattner at apple.com
Mon May 30 15:39:20 CDT 2016


> On May 30, 2016, at 6:01 AM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> 
> // Proposed syntax:
> func takes(a (valueA, valueB): (Int, Int)) {
>  // use valueA
>  // use valueB
> }

FWIW, Swift 1 supported tuple destructuring in parameter lists, and we took it out to simplify the language and eliminate special cases.  Whereas as a very early version of swift modeled parameter lists using patterns (something very common in functional programming languages) we have progressively and intentionally move away from that approach.

-Chris


More information about the swift-evolution mailing list