<html><head><style>
body {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        padding:1em;
        margin:auto;
        background:#fefefe;
}

h1, h2, h3, h4, h5, h6 {
        font-weight: bold;
}

h1 {
        color: #000000;
        font-size: 28pt;
}

h2 {
        border-bottom: 1px solid #CCCCCC;
        color: #000000;
        font-size: 24px;
}

h3 {
        font-size: 18px;
}

h4 {
        font-size: 16px;
}

h5 {
        font-size: 14px;
}

h6 {
        color: #777777;
        background-color: inherit;
        font-size: 14px;
}

hr {
        height: 0.2em;
        border: 0;
        color: #CCCCCC;
        background-color: #CCCCCC;
    display: inherit;
}

p, blockquote, ul, ol, dl, li, table, pre {
        margin: 15px 0;
}

a, a:visited {
        color: #4183C4;
        background-color: inherit;
        text-decoration: none;
}

#message {
        border-radius: 6px;
        border: 1px solid #ccc;
        display:block;
        width:100%;
        height:60px;
        margin:6px 0px;
}

button, #ws {
        font-size: 12 pt;
        padding: 4px 6px;
        border-radius: 5px;
        border: 1px solid #bbb;
        background-color: #eee;
}

code, pre, #ws, #message {
        font-family: Monaco;
        font-size: 10pt;
        border-radius: 3px;
        background-color: #F8F8F8;
        color: inherit;
}

code {
        border: 1px solid #EAEAEA;
        margin: 0 2px;
        padding: 0 5px;
}

pre {
        border: 1px solid #CCCCCC;
        overflow: auto;
        padding: 4px 8px;
}

pre > code {
        border: 0;
        margin: 0;
        padding: 0;
}

#ws { background-color: #f8f8f8; }


.bloop_markdown table {
border-collapse: collapse;  
font-family: Helvetica, arial, freesans, clean, sans-serif;  
color: rgb(51, 51, 51);  
font-size: 15px; line-height: 25px;
padding: 0; }

.bloop_markdown table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
     
.bloop_markdown table tr:nth-child(2n) {
background-color: #f8f8f8; }

.bloop_markdown table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

.bloop_markdown table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

.bloop_markdown table tr th :first-child, table tr td :first-child {
margin-top: 0; }

.bloop_markdown table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }

.bloop_markdown blockquote{
  border-left: 4px solid #dddddd;
  padding: 0 15px;
  color: #777777; }
  blockquote > :first-child {
    margin-top: 0; }
  blockquote > :last-child {
    margin-bottom: 0; }

code, pre, #ws, #message {
    word-break: normal;
    word-wrap: normal;
}

hr {
    display: inherit;
}

.bloop_markdown :first-child {
    -webkit-margin-before: 0;
}

code, pre, #ws, #message {
    font-family: Menlo, Consolas, Liberation Mono, Courier, monospace;
}


.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="bloop_markdown"><p>Okay now I see where this is going. So basically you want to mirror the behavior of function parameters into tuples.</p>

<p>You might want to be a little bit more explicit on types in your proposal to better understand the so called ‘tuple shuffle’.</p>

<pre><code class="swift">let a: (x: Int, y: Int) = (x: 1, y: 2)
var b: (y: Int, x: Int) = a
a.x == b.x
a.y == b.y
</code></pre>

<p>Label swap (tuple shuffle) while destructuring:</p>

<pre><code class="swift">let tuple: (first: Int, second: (x: Int, y: Int)) = (first: 0, second: (x: 1, y: 2))

let (first: a, second: (x: b, y: c)): (first: Int, second: (x: Int, y: Int)) = tuple // fine, unaffected

let (second: (x: b, y: c), first: a): (second: (x: Int, y: Int), first: Int) = tuple // shuffle =&gt; error
</code></pre>

<p></p></div><div class="bloop_original_html"><style>body{font-family:Helvetica,Arial;font-size:13px}</style><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div> <br> <div id="bloop_sign_1493962644578445824" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">--&nbsp;<br>Adrian Zubarev<br>Sent with Airmail</div></div> <br><p class="airmail_on">Am 5. Mai 2017 um 07:18:37, Robert Widmann (<a href="mailto:devteam.codafi@gmail.com">devteam.codafi@gmail.com</a>) schrieb:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>



<title></title>


None of those are affected. &nbsp;See the note in the proposal.
<div class=""><br class=""></div>
<div class="">~Robert Widmann</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On May 5, 2017, at 1:16 AM, Adrian Zubarev
&lt;<a href="mailto:adrian.zubarev@devandartist.com" class="">adrian.zubarev@devandartist.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);">
<p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">
Hi Robert,</p>
<p style="margin: 15px 0px;" class="">I’m trying to understand the
impact of your proposal and the feature you want to remove from the
language. Could you describe a little more on how if ever this
affects tuple destructuring?<span class="Apple-converted-space">&nbsp;</span></p>
<pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code class="swift" style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;">var (a, b, c) = (0, "", 0)

(a, b) = (42, "Hello Swift")

(a = 42, b = "Hello Swift")

var (x, y) = (0, 42)

(x, y) = (y, x) // swap without a temporary value
</code></pre>
<div style="margin: 15px 0px;" class=""><br class="webkit-block-placeholder"></div>
</div>
<div class="bloop_original_html" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);">
<div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div>
<br class="">
<div id="bloop_sign_1493961127118854912" class="bloop_sign">
<div style="font-family: helvetica, arial; font-size: 13px;" class="">--&nbsp;<br class="">
Adrian Zubarev<br class="">
Sent with Airmail</div>
</div>
<br class="">
<p class="airmail_on" style="margin: 15px 0px;">Am 5. Mai 2017 um
04:15:12, Robert Widmann via swift-evolution (<a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a>) schrieb:</p>
<blockquote type="cite" class="clean_bq" style="margin: 15px 0px;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class=""></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class="">Hi all,</span>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class="">So sorry that this proposal comes so late in the game, but
I feel it’s too important not to bring it to the attention of the
community now. &nbsp;Attached is a proposal to deprecate a language
feature many of you will probably have never had the chance to use:
Tuple Shuffles. &nbsp;I’ve attached a copy of the first draft of
the proposal below, but the latest copy can be read
on&nbsp;<a href="https://github.com/apple/swift-evolution/pull/705/files" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">Github</a>.</span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class="">Thanks!</span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class="">~Robert Widmann</span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></span></div>
<div class="">
<h1 class="" style="font-weight: bold; color: rgb(36, 41, 46); font-size: 28pt; box-sizing: border-box; margin-right: 0px; margin-bottom: 16px; margin-left: 0px; line-height: 1.25; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255); margin-top: 0px !important;">
<span style="margin-top: 0px; margin-bottom: 0px;" class="">Deprecate Tuple Shuffles</span></h1>
<ul class="" style="margin: 0px 0px 16px; box-sizing: border-box; padding-left: 2em; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<li class="" style="margin: 15px 0px; box-sizing: border-box;">
<span style="margin-top: 0px; margin-bottom: 0px;" class="">Proposal:&nbsp;<a href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-filename.md" class="" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">SE-NNNN</a></span></li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;"><span style="margin-top: 0px; margin-bottom: 0px;" class="">Authors:&nbsp;<a href="https://github.com/codafi" class="" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">Robert
Widmann</a></span></li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;"><span style="margin-top: 0px; margin-bottom: 0px;" class="">Review Manager:
TBD</span></li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;"><span style="margin-top: 0px; margin-bottom: 0px;" class="">Status:&nbsp;<span class="" style="box-sizing: border-box; font-weight: 600;">Awaiting
review</span></span></li>
</ul>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); color: rgb(36, 41, 46); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-introduction" class="anchor" href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-deprecate-tuple-shuffles.md#introduction" aria-hidden="true" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Introduction</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
This proposal seeks the deprecation of a little-known feature of
Swift called a "Tuple Shuffle".</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); color: rgb(36, 41, 46); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-motivation" class="anchor" href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-deprecate-tuple-shuffles.md#motivation" aria-hidden="true" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Motivation</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
A tuple-shuffle is an undocumented feature of Swift in which one
can re-order the indices of a tuple by writing a pattern that
describes a permutation in a syntax reminiscent of adding
type-annotations to a parameter list:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<pre class="" style="margin: 0px; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(246, 248, 250); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> a <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">x</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">1</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">y</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">2</span>)
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">var</span> b<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">y</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">x</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>)
b <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> a</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
It can be used to simultaneously destructure and reorder a
tuple:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<pre class="" style="margin: 0px; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(246, 248, 250); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> tuple <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">first</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">second</span>: (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">x</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">1</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">y</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">2</span>))
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">second</span>: (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">x</span>: b, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">y</span>: c), <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">first</span>: a) <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> tuple</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
It can also be used to map parameter labels out of order in a call
expression:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<pre class="" style="margin: 0px; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(246, 248, 250); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">foo</span>(<span class="pl-smi" style="box-sizing: border-box; color: rgb(51, 51, 51);"><span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">_</span></span> : (x : <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>, y : <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>)) {}
<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">foo</span>((<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">y</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">5</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">x</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">10</span>)) <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Valid</span></pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
Note that a tuple shuffle is distinct from a re-assignment through
a tuple pattern. For example, this series of statements will
continue to function as before:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<pre class="" style="margin: 0px; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(246, 248, 250); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">var</span> x <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">5</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">var</span> y <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">10</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">var</span> z <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">15</span>
(z, y, x) <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> (x, z, y)</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
Their inclusion in the language complicates every part of the
compiler stack, uses a&nbsp;<a href="https://twitter.com/CodaFi_/status/860246169854894081" class="" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">syntax
that can be confused for type annotations</a>, contradicts the
goals of earlier SE's (see&nbsp;<a href="https://github.com/apple/swift-evolution/blob/9cf2685293108ea3efcbebb7ee6a8618b83d4a90/proposals/0060-defaulted-parameter-order.md" class="" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">SE-0060</a>),
and makes non-sensical patterns possible in surprising places.</p>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
Take switch-statements, for example:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<pre class="" style="margin: 0px; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(246, 248, 250); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">switch</span> ((<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>, <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>), <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>){   
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">case</span> (<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">_</span> : <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> (y, z), <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">_</span> : <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> s)<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> () <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> We are forbidden from giving these patterns names other than "_" </span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">default</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> ()   
}</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
This proposal seeks to deprecate them in Swift 3 compatibility mode
and enforce that deprecation as a hard error in Swift 4 to
facilitate their eventual removal from the language.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); color: rgb(36, 41, 46); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-proposed-solution" class="anchor" href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-deprecate-tuple-shuffles.md#proposed-solution" aria-hidden="true" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Proposed solution</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
Construction of Tuple Shuffle Expressions will become a warning in
Swift 3 compatibility mode and will be a hard-error in Swift 4.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); color: rgb(36, 41, 46); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-detailed-design" class="anchor" href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-deprecate-tuple-shuffles.md#detailed-design" aria-hidden="true" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Detailed design</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
In addition to the necessary diagnostics, the grammar will be
ammended to simplify the following productions:</p>
<div class="highlight highlight-source-diff" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
<pre class="" style="margin: 0px; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(246, 248, 250); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;">tuple-pattern → (tuple-pattern-element-list &lt;opt&gt;)
tuple-pattern-element-list → tuple-pattern-element | tuple-pattern-element , tuple-pattern-element-list
<span class="pl-md" style="box-sizing: border-box; color: rgb(189, 44, 0); background-color: rgb(255, 236, 236);"><span class="pl-md" style="box-sizing: border-box;">-</span> tuple-pattern-element → pattern | identifier:pattern</span>
<span class="pl-mi1" style="box-sizing: border-box; color: rgb(85, 165, 50); background-color: rgb(234, 255, 234);"><span class="pl-mi1" style="box-sizing: border-box;">+</span> tuple-pattern-element → pattern</span></pre></div>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); color: rgb(36, 41, 46); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-impact-on-existing-code" class="anchor" href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-deprecate-tuple-shuffles.md#impact-on-existing-code" aria-hidden="true" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Impact on Existing Code</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);">
Because very little code is intentionally using Tuple Shuffles,
impact on existing code will be negligible but not non-zero.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(234, 236, 239); color: rgb(36, 41, 46); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-alternatives-considered" class="anchor" href="https://github.com/CodaFi/swift-evolution/blob/8eaf320b3c2a117909fc0269c398e89c033a4b9f/proposals/NNNN-deprecate-tuple-shuffles.md#alternatives-considered" aria-hidden="true" style="color: rgb(3, 102, 214); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Alternatives considered</h2>
<div class="" style="box-sizing: border-box; margin-top: 0px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255); margin-bottom: 0px !important;">
Continue to keep the architecture in place to facilitate this
feature.</div>
</div>
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</div>
</div>
</blockquote>
</div>
<div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);">
</div>
</div>
</blockquote>
</div>
<br class=""></div>


</div></div></span></blockquote></div><div class="bloop_markdown"><p></p></div></body></html>