<div dir="ltr">Thanks Tino, it would be good to come up with some alternatives for +.<div><br></div><div>I was initially thinking `<font face="monospace, monospace">(Int,Int) (Int,Int)</font>` without operators. However I think this could potentially be a mistake. I like + as it&#39;s familiar with array operators.</div><div><br></div><div>As for the prevalence of tuples in the language, every function and value in Swift has a tuple in it. The associated values in an enum are a tuple. They are everywhere.</div><div><br></div><div>For some more examples have a look at the linked proposal :)</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 31, 2016 at 11:28 PM, Tino Heth <span dir="ltr">&lt;<a href="mailto:2th@gmx.de" target="_blank">2th@gmx.de</a>&gt;</span> wrote:<br><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><span class=""><blockquote type="cite"><div><div dir="ltr"><div>I&#39;d like a <span style="color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;">a way to concatenate tuple types together:</span><br></div><div><span style="color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;"><br></span></div><div><div style="margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;"><pre style="overflow:auto;font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;margin-top:0px;margin-bottom:0px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal"><span style="color:rgb(167,29,93)">typealias</span> ABCD <span style="color:rgb(167,29,93)">=</span> (A,B)<span style="color:rgb(167,29,93)">+</span>(C,D) <span style="color:rgb(150,152,150)">// Same as (A,B,C,D)</span></pre></div></div></div></div></blockquote></span><div>I don&#39;t like the use of &quot;+&quot; for concatenation, but giving more power to tuples would be neat… you just need to find examples with convincing motivation ;-)</div><div>Obviously, the value of tuple-operation increases with the prevalence of tuples in language and libraries, so I wouldn&#39;t be surprised if their importance rises in the future (and maybe we can think of nice ways to combine tuple-related ideas).</div><span class=""><br><blockquote type="cite"><div><div dir="ltr"><div><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;">Also a way to allow tuples to be converted to other tuples that are the same when flattened:</p><div style="margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;"><pre style="overflow:auto;font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;margin-top:0px;margin-bottom:0px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal">(a,(b,c),d) <span style="color:rgb(167,29,93)">as</span> ((a,b),(c,d))</pre></div></div></div></div></blockquote></span></div>It would be cool if such a concept (&quot;compiler, please check if those two types have a compatible memory-layout, and if that is the case, let me use them interchangeable when I tell you to do so) could be extended to structs — that could solve the problem of different implementations of fundamental types nicely.<div><br></div><div>That leads me to an unrelated thought:</div><div>It seems to me there is a duality between methods and closures on one side, and structs and tuples on the other — tuples feel very much like anonymous structs (restricted by the fact that you cannot add methods like custom getters &amp; setters). It&#39;s not related to you proposal, but I wonder if there are implications visible from this point of view...</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Tino</div></font></span></div></blockquote></div><br></div>