<div dir="ltr">IMHO There seems to be a lot of bugs and inconsistencies left in more than just the reflective type system, for example the following won't compile although the two foo funcs clearly take different types as argument:<div><br></div><div><div>func foo(fun: (Int, Int) -> ()) { print("was given a function of type: (Int, Int) -> ()") }</div><div>func foo(fun: ((Int, Int)) -> ()) { print("was given a function of type: ((Int, Int)) -> ()") }</div><div><br></div><div>// This will result in error: invalid redeclaration of 'foo(fun:)'</div></div><div><br></div><div>I would expect this to compile, and I can't understand how this has anything to do with the reflective type system.</div><div><br></div><div><br></div><div>Here is another example:</div><div><div><br></div><div><div>func add(_ a: Int, _ b: Int) -> Int { return a + b }</div><div>let a: (Int, Int) -> Int = add</div><div>let b: ((Int, Int)) -> Int = add // This is OK, unexpectedly</div></div><div><br></div></div><div>I would not expect it to compile since the add func does not have the type ((Int, Int)) -> Int.</div><div>I don't think that is a dynamic cast, is it?<br></div><div><br></div><div>/Jens</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 2:45 AM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><div>On Jun 5, 2017, at 12:08 AM, Jens Persson via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><div><div dir="ltr">So the bug in the reflective type system needs to be fixed before SE-0110 can actually be implemented (so that the statements in its title and text are true when compared to the actual behavior of the current Swift 4 compiler), </div></div></blockquote><div><br></div></span>Gaps in the reflective type system are bugs, but they are not showstopper bugs. We do not even expose any way to query the reflective system today; it basically only affects type equality and dynamic casts that programmers are very unlikely to use. The changes in call type-checking are vastly more important, are implemented (modulo bugs, of course), and by themselves warrant calling SE-0110 implemented.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>John.</div><div><br></div></font></span><div><blockquote type="cite"><div><span class=""><div dir="ltr"><div><br></div><div>And yet:</div><div><br></div><div>1. The status of SE-0110 is "Implemented"</div><div><br></div><div>2. These statuses of the following issues are "resolved":</div><div> SR-2008: Distinguish between single-tuple and multiple-argument function types<br></div><div> SR-2216: Confusing behavior related to closure types and tuples</div><div> SR-296: Fix inconsistencies related to tuples, arg/param lists, type params, typealiases</div><div><br></div><div>Why?</div><div><br></div><div>/Jens</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 4, 2017 at 5:49 PM, 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">I assumed that Swift 3 mode would be the default, so that existing `#!/usr/bin/swift` scripts continue to work.<br>
<span class="m_309397005148687700HOEnZb"><font color="#888888"><br>
-- Ben<br>
</font></span><div class="m_309397005148687700HOEnZb"><div class="m_309397005148687700h5"><br>
> On 3 Jun 2017, at 23:47, Jens Persson <<a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a>> wrote:<br>
><br>
> Yes of course, try my demonstration code yourself.<br>
> (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)<br>
><br>
>> On Sun, Jun 4, 2017 at 12:37 AM, Ben Rimmington <<a href="mailto:me@benrimmington.com" target="_blank">me@benrimmington.com</a>> wrote:<br>
>><br>
>> 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-co<wbr>mpatibility</a>><br>
>><br>
>> -- Ben<br>
</div></div></blockquote></div><br></div></span><span class="">
______________________________<wbr>_________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br></span></div></blockquote></div><br></div></blockquote></div><br></div>