<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div id="bloop_customfont" style="margin: 0px;">I would like to discuss about the following topic.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Wouldn't it be better to enforce argument labels on tuples types, if the tuple type defines them?</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">```swift</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">func foo(tuple: (a: Int, b: Int)) { /* do something */ }</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">let test1 = (10, 100)</div><div id="bloop_customfont" style="margin: 0px;">let test2: (a: Int, c: Int) = test</div><div id="bloop_customfont" style="margin: 0px;">let test3: (Int, Int) = test2</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">foo(test1)</div><div id="bloop_customfont" style="margin: 0px;">foo(test3)</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">/*</div><div id="bloop_customfont" style="margin: 0px;">cannot convert value of type '(a: Int, c: Int)'&nbsp;</div><div id="bloop_customfont" style="margin: 0px;">to expected argument type '(a: Int, b: Int)'</div><div id="bloop_customfont" style="margin: 0px;">*/</div><div id="bloop_customfont" style="margin: 0px;">foo(test2)&nbsp;</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">```</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Function `foo` awaits a tuple of type `(a: Int, b: Int)` but `test1` and `test3` are both just of type `(Int, Int)`.</div><div id="bloop_customfont" style="margin: 0px;">As expected `test2` will raise an error because it has indeed a wrong type `(a: Int, c: Int)`.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">I'd suggest to enforce argument labeling on tuple types for better readability, because wasn't it the idea behind labels inside tuples?</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">`foo(test1)` should raise an error `cannot convert value of type '(Int, Int)' to expected argument type '(a: Int, b: Int)'` as long as `test1` is not written like `let test1 = (a: 10, b: 100)` or `let test1: (a: Int, b: Int) = (a: 10, b: 100)`</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">This will impact current codebase if you used labels but provided tuples without labels like the example above. The migrator could solve this by providing labels automatically to tuples where this error occurs.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">I'm not good at writing proposals for the GitHub repository at all, so if the community likes this idea, I'd be glad to see some help for this little proposal.</div></div><br><div id="bloop_sign_1461158299115177984" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">--&nbsp;<br>Adrian Zubarev<br>Sent with Airmail</div></div></body></html>