<div dir="ltr">On Fri, May 5, 2017 at 1:12 AM, Adrian Zubarev <span dir="ltr">&lt;<a href="mailto:adrian.zubarev@devandartist.com" target="_blank">adrian.zubarev@devandartist.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="m_-8673173014258294892bloop_markdown"><p>Oh pardon, on the first glance I didn’t realized the issue with that example.</p>

<p>Here is an updated example that would work:</p>

<pre><code class="m_-8673173014258294892swift">let (first, second: (x, y)): (first: Int, second: (x: Int, y: Int)) = tuple
</code></pre>

<p>This should work right?</p></div></div></blockquote><div>No, again, this would be banned. You are using a label (a thing that ends in a colon) inside a tuple pattern (a thing between parenthesis that comes after &quot;let&quot;).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="m_-8673173014258294892bloop_markdown"><p>It’s assigning the inner tuple to <code>second</code> while also creating two additional constants from the inner tuple. I know this is redundant and can be used as <code>second.x</code>, but this should work like right, because it’s nested tuple destructuring? If we’d use <code>var</code> instead of <code>let</code> then <code>x</code> would contain the value assigned from the inner tuple, but it would be completely independent from the new <code>second</code> tuple variable.</p>

<p></p></div><div class="m_-8673173014258294892bloop_original_html"><span class=""><div id="m_-8673173014258294892bloop_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="m_-8673173014258294892bloop_sign_1493964307679527936" class="m_-8673173014258294892bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <br></span><span class=""><p class="m_-8673173014258294892airmail_on">Am 5. Mai 2017 um 08:04:07, Xiaodi Wu (<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>) schrieb:</p> <blockquote type="cite" class="m_-8673173014258294892clean_bq"><span><div><blockquote class="m_-8673173014258294892clean_bq" style="font-family:helvetica;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"><div style="word-wrap:break-word"><div class="m_-8673173014258294892m_8709656768579954978bloop_markdown"><pre><code class="m_-8673173014258294892m_8709656768579954978swift">let (first: a, second: (x: b, y: c)): (first: Int, second: (x: Int, y: Int)) = tuple // fine, unaffected</code></pre></div></div></blockquote><div style="color:rgb(0,0,0);font-family:helvetica;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">This would be banned. You are using labels (things ending with a colon) in a pattern (the stuff that comes after the word &quot;let&quot;).</div></div></span></blockquote></span></div><div class="m_-8673173014258294892bloop_markdown"><p></p></div></div></blockquote></div><br></div></div>