<html><head></head><body>The basic design is fine, but I wouldn't want to add more noise to my code. We could keep (label: Protocol) as a shorthand form for (label: Any<Protocol>) similar to Optionals.<div><br></div><div>What's the benifite of this anywasys? What exactly will this solve?! <br> <br><div class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <p class="gmail_quote" style="color:#000;">Am 23. August 2016 um 23:18:35, Chris Lattner via swift-evolution (<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>) schrieb:</p> <blockquote type="cite" class="gmail_quote"><span><div><div></div><div>On Aug 23, 2016, at 1:49 PM, Anton Zhilin via swift-evolution <swift-evolution@swift.org> wrote:<br><blockquote type="cite">I haven't yet prepared a formal proposal, but the idea should be understood by pretty much everyone. This topic has been discussed, but deferred to "post-Swift3". I think the time for it has come.<br></blockquote><br>Hi Anton,<br><br>This is a source breaking change, and we don’t have a framework established for how to handle those in the post-swift 3 world yet. The core team is focusing on finishing up Swift 3 right now, but I expect that one of the first topics will be to define and iterate on the model for handling source changes.<br><br>Only once that is established can we determine whether a proposal like this is possible and know what the tradeoffs are that it entails.<br><br>-Chris<br><br><br><blockquote type="cite"><br>Basically, the proposal is to make protocols non-types. To use protocol as an existential type, it must be wrapped in Any:<br><br>protocol ExampleProtocol {<br>func foo() -> Int<br>func bar() -> String<br>}<br><br>func f<T: ExampleProtocol>() // OK<br><br>func f(x: ExampleProtocol) // error: ExampleProtocol is not a type<br>func f(x: Any<ExampleProtocol>) // OK<br><br>This will syntactically separate existential types from protocols themselves and generic constraints.<br>The proposal does not allow for much variativity, and it looks like the proposal can be easily created and submitted.<br>_______________________________________________<br>swift-evolution mailing list<br>swift-evolution@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-evolution<br></blockquote><br>_______________________________________________<br>swift-evolution mailing list<br>swift-evolution@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-evolution<br></div></div></span></blockquote>
</div></body></html>