<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Before I start working on a proposal, I’d like to understand the problem in detail. Can someone help me understand why parts of the language treats tuple labels as type and other not?<div class=""><div class=""><br class=""></div><div class=""><font face="Menlo" class="">let a: (lhs: Int, rhs: Int) = (4, 5) // works</font></div><div class=""><font face="Menlo" class="">(4,5).dynamicType == (lhs: 2, rhs: 6).dynamicType // true</font></div><div class=""><br class=""></div><div class="">But:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">[(lhs: 3, rhs: 5)] == [(1,2)]</font></div><div class=""><font face="Menlo" class="">// Binary operator ‘==‘ cannot be applied to operands of type ‘[(las: Int, rhs: Int)]’ and ‘[(Int, Int)]’</font></div><div class=""><font face="Menlo" class="">[(lhs: 3, rhs: 5)].dynamicType == [(1,2)].dynamicType</font></div><div class=""><font face="Menlo" class="">// Binary operator ‘==‘ cannot be applied to operands of type ‘Array<(las: Int, rhs: Int)>.Type’ and ‘Array<(Int, Int)>'</font></div><div class=""><br class=""></div><div class="">And:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">struct Foo<T> {<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>let bar: T<br class="">}<br class=""><br class="">var foo1 = Foo(bar: (4, 5))<br class="">var foo2 = Foo(bar: (lhs: 4, rhs: 5))<br class="">foo1 = foo2</font></div><div class=""><font face="Menlo" class="">// Cannot assign value of type ‘Foo<(las: Int, res: Int)>’ to type ‘Foo<(Int, Int)>’</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">But:</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">foo1.dynamicType == foo2.dynamicType // true</font></div><div class=""><br class=""></div><div class="">So it seems that in parts of the language, they are treated with the same type, but not in generics.</div></div><div class=""><br class=""></div><div class="">Any input?</div></body></html>