<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 24, 2017, at 1:01 PM, Pavel Yaskevich <<a href="mailto:pavel.yaskevich@gmail.com" class="">pavel.yaskevich@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; 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;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; 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;">On Wed, May 24, 2017 at 12:57 PM, Tony Parker<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:anthony.parker@apple.com" target="_blank" class="">anthony.parker@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word; line-break: after-white-space;" class=""><br class=""><div class=""><span class=""><br class=""><blockquote type="cite" class=""><div class="">On May 24, 2017, at 12:51 PM, Pavel Yaskevich <<a href="mailto:pavel.yaskevich@gmail.com" target="_blank" class="">pavel.yaskevich@gmail.com</a>> wrote:</div><br class="m_-3568990687382255573Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; 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;" class=""><div class="gmail_extra">Hi Tony,</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><div class="gmail_quote">On Wed, May 24, 2017 at 12:37 PM, Jose Cheyo Jimenez via swift-evolution<span class="m_-3568990687382255573Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-<wbr class="">evolution@swift.org</a>></span><span class="m_-3568990687382255573Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class="">The way I interpreted SE-110 is that it was suppose to address anonymous arguments. <div class=""><br class=""></div><div class="">Instead of using $0.0, $0.1, One needs to use $0, $1 when there are multiple arguments. <div class=""><br class=""></div><div class="">I was not aware of any implications for explicitly named parameters. </div><div class=""><br class=""></div><div class="">Perhaps the issue is with the signature of forEach. Does it need to be a nested tuple?</div><div class=""><br class=""></div><div class="">public func forEach(_ body: ((key: Key, value: Value)) throws -> Void) rethro<wbr class="">ws<br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">Jose is right about this one, since the signature of forEach is a tuple nested into paren it means that `forEach` expects a single argument</div><div class="">of a tuple type instead of two arguments, such "tuple argument destructuring" was supported by Swift 3 but after SE-0110 no longer is</div><div class="">because type-checker is preserving top level parens in parameters/arguments. </div><div class=""><br class=""></div><div class="">Best Regards, Pavel.</div></div></div></div></div></blockquote><div class=""><br class=""></div></span>Well, frankly, I don’t think we should ship with such a glaring usability regression.</div><div class=""><br class=""></div><div class="">What’s the mitigation plan? Perhaps we should wholesale revert it until we have time to reconsider the fallout?</div></div></blockquote><div class=""><br class=""></div><div class="">There is a migrator support, and I've made a couple of diagnostic improvements for it, that produce fix-its which are exactly</div><div class="">what you see in the aforementioned PR. Otherwise, I'd defer to Slava, who was implementor of SE-0110.</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div>The migrator support resulted in the fix-it below, which I believe is a subpar experience for such a core part of using collections and closures in general.</div><div><br class=""></div><div>- Tony</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; 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;"><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word; line-break: after-white-space;" class=""><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">- Tony</div></font></span><span class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; 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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> <br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><div class=""><div class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="m_-3568990687382255573gmail-h5"><div class="">On May 24, 2017, at 12:12 PM, Tony Parker via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:</div><br class="m_-3568990687382255573gmail-m_6296259074267002623Apple-interchange-newline"></div></div><div class=""><div class=""><div class="m_-3568990687382255573gmail-h5"><div style="word-wrap: break-word;" class="">Hi everyone,<div class=""><br class=""></div><div class="">We received a pull request in swift-corelibs-foundation which is apparently in response to a language change for SE-0110.</div><div class=""><br class=""></div><div class="">It turns this perfectly reasonable code:</div><div class=""><div class=""><br class=""></div><div class=""><font face="Menlo" class="">- self.forEach { (keyItem, valueItem) in</font></div><div class=""><br class=""></div><div class="">into this:</div><div class=""><br class=""></div><div class=""><br class=""><font face="Menlo" class="">+ self.forEach { (arg) in<br class="">+ let (keyItem, valueItem) = arg<br class=""></font><br class="">Is that really the design pattern we want to encourage? What was wrong with the previous code?</div><div class=""><br class=""></div><div class="">(<a href="https://github.com/apple/swift-corelibs-foundation/pull/995/files" target="_blank" class="">https://github.com/apple/swif<wbr class="">t-corelibs-foundation/pull/<wbr class="">995/files</a>)</div></div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""></div></div></div></div>______________________________<wbr class="">_________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailma<wbr class="">n/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></div><br class="">______________________________<wbr class="">_________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailma<wbr class="">n/listinfo/swift-evolution</a></blockquote></div></div></div></div></blockquote></div></span></div></blockquote></div></div></blockquote></div><br class=""></body></html>