<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Jun 3, 2017, at 3:01 PM, Jens Persson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div dir="ltr" class=""><div class="">I was notified that my SR-2216 and SR-296 had been "fixed as part of implementing SE-0110".<br class=""></div><div class=""><br class=""></div><div class="">But AFAICT SE-0110 can't possibly be fully implemented in dev snapshot 2017-06-02, even though the status of SE-0110 is "Implemented (Swift 4)".</div></div></div></blockquote><div><br class=""></div>Yes, the reflective type system does not yet properly distinguish these cases; it's a bug and will be fixed, but probably not before 4.0.</div><div><br class=""></div><div>John.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The title of SE-0110 is</div><div class="">"Distinguish between single-tuple and multiple-argument function types"</div><div class=""><br class=""></div><div class="">Keep that in mind while observing the following demonstration of the (Swift 4) behavior of Developer Snapshot 2017-06-02 (a):</div><div class=""><br class=""></div><div class="">func f(_ a: Int, _ b: Int) { print("\(a), \(b)") }</div><div class="">func g(_ tuple: (Int, Int)) { print("\(tuple)") }</div><div class="">f(1, 2) // 1, 2</div><div class="">g((1, 2)) // (1, 2)</div><div class="">// Working as expected.</div><div class=""><br class=""></div><div class="">// But:</div><div class="">print(type(of: f) == type(of: g)) // true</div><div class="">// IMHO this is not how to properly</div><div class="">// "Distinguish between single-tuple and multiple-argument function types"</div><div class=""><br class=""></div><div class="">// And as if that wasn't enough (pay close attention):</div><div class="">var (fCopy, gCopy) = (f, g)</div><div class="">fCopy(1, 2) // 1, 2</div><div class="">gCopy((1, 2)) // (1, 2)</div><div class="">swap(&amp;fCopy, &amp;gCopy)</div><div class="">fCopy(1, 2) // (1, 2)</div><div class="">gCopy((1, 2)) // 1, 2</div><div class="">// Crazy!</div><div class=""><br class=""></div><div class="">I'm trying to put this behavior and the following pieces together:</div><div class=""><br class=""></div><div class="">1. The introdoction from SE-0110:</div><div class="">"Swift's type system should properly distinguish between functions that take one tuple argument, and functions that take multiple arguments."</div><div class=""><br class=""></div><div class="">2. The status of SE-0110:</div><div class="">Implemented (Swift 4)</div><div class=""><br class=""></div><div class="">3. The "fixed as part of implementing SE-0110" notification of my bug reports&nbsp;</div><div class="">SR-2216: Confusing behavior related to closure types and tuples</div><div class="">SR-296: Fix inconsistencies related to tuples, arg/param lists, type params, typealiases</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Perhaps SE-0110 is just not fully implemented in dev snapshot 2017-06-02, but it is implemented somewhere, why else should it get the status "implemented"?</div><div class=""><br class=""></div><div class="">But then I read the following by Vladimir S (one of the SE-0110 authors?):&nbsp;</div><div class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170529/036965.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170529/036965.html</a></div><div class=""><br class=""></div><div class="">It's a very interesting read, and it's nice to see these old inconsistencies are getting some attention (they deserve all the attention they can get), but I'm still confused.</div><div class=""><br class=""></div><div class="">Is it possible to implement SE-0110 without sorting out the above demonstrated inconsistencies?</div><div class=""><br class=""></div><div class="">Should status of SE-0110 really be "Implemented"?</div><div class=""><br class=""></div><div class="">/Jens</div><div class=""><br class=""></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>