<div dir="ltr">Yes of course, try my demonstration code yourself.<div>(In the current dev snapshots, -swift-version 4 is the default and -swift-version 3 is what you need to set if you want 3 compability)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 4, 2017 at 12:37 AM, Ben Rimmington <span dir="ltr"><<a href="mailto:me@benrimmington.com" target="_blank">me@benrimmington.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Are you using the Swift 4 language mode?<br>
<br>
<<a href="https://swift.org/blog/swift-4-0-release-process/#source-compatibility" rel="noreferrer" target="_blank">https://swift.org/blog/swift-<wbr>4-0-release-process/#source-<wbr>compatibility</a>><br>
<span class="HOEnZb"><font color="#888888"><br>
-- Ben<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On 3 Jun 2017, at 23:01, Jens Persson wrote:<br>
><br>
> I was notified that my SR-2216 and SR-296 had been "fixed as part of implementing SE-0110".<br>
><br>
> 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)".<br>
><br>
><br>
> The title of SE-0110 is<br>
> "Distinguish between single-tuple and multiple-argument function types"<br>
><br>
> Keep that in mind while observing the following demonstration of the (Swift 4) behavior of Developer Snapshot 2017-06-02 (a):<br>
><br>
> func f(_ a: Int, _ b: Int) { print("\(a), \(b)") }<br>
> func g(_ tuple: (Int, Int)) { print("\(tuple)") }<br>
> f(1, 2) // 1, 2<br>
> g((1, 2)) // (1, 2)<br>
> // Working as expected.<br>
><br>
> // But:<br>
> print(type(of: f) == type(of: g)) // true<br>
> // IMHO this is not how to properly<br>
> // "Distinguish between single-tuple and multiple-argument function types"<br>
><br>
> // And as if that wasn't enough (pay close attention):<br>
> var (fCopy, gCopy) = (f, g)<br>
> fCopy(1, 2) // 1, 2<br>
> gCopy((1, 2)) // (1, 2)<br>
> swap(&fCopy, &gCopy)<br>
> fCopy(1, 2) // (1, 2)<br>
> gCopy((1, 2)) // 1, 2<br>
> // Crazy!<br>
><br>
> I'm trying to put this behavior and the following pieces together:<br>
><br>
> 1. The introdoction from SE-0110:<br>
> "Swift's type system should properly distinguish between functions that take one tuple argument, and functions that take multiple arguments."<br>
><br>
> 2. The status of SE-0110:<br>
> Implemented (Swift 4)<br>
><br>
> 3. The "fixed as part of implementing SE-0110" notification of my bug reports<br>
> SR-2216: Confusing behavior related to closure types and tuples<br>
> SR-296: Fix inconsistencies related to tuples, arg/param lists, type params, typealiases<br>
><br>
><br>
> 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"?<br>
><br>
> But then I read the following by Vladimir S (one of the SE-0110 authors?):<br>
> <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170529/036965.html" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>pipermail/swift-evolution/<wbr>Week-of-Mon-20170529/036965.<wbr>html</a><br>
><br>
> 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.<br>
><br>
> Is it possible to implement SE-0110 without sorting out the above demonstrated inconsistencies?<br>
><br>
> Should status of SE-0110 really be "Implemented"?<br>
><br>
> /Jens<br>
</div></div></blockquote></div><br></div>