<html><head></head><body>What do you mean by "go before review"?<div><br></div><div>I moved the proposal to a new thread: [Proposal] New mechanism to combine Types with/or Protocols</div><div><br></div><div>Feel free to read the formatted document, provide me some feedback and point me to typos if you spot any.</div><div><br></div><div>I'll add the possibility to allow multiple reference/value types within the angle brackets as a considered alternative.</div><div><br></div><div>I finally understand what Thorsten meant with this example:</div><div><br></div><div>func intersect<T, U>(set1: Set<T>, set2: Set<U>) -> Set<All<T, U>></div><div><br></div><div>If T == U we'll get All<T, T> == T</div><div><br></div><div>Or simply:</div><div><br></div><div><font face="UICTFontTextStyleBody"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">func intersect<T>(set1: Set<T>, set2: Set<T>) -> Set<All<T>></span></font></div><div><br></div><div>This makes more sense to me. :)<br> <br><div class="bloop_sign"><div>-- <br>Adrian Zubarev</div></div> <p class="gmail_quote" style="color:#000;">Am 17. Mai 2016 um 09:09:55, Austin Zheng 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>This is the proposal I'd like to see go before review, and the one I think is closest in spirit to the generics roadmap.<br><br>Things like adding union types, and rewriting Swift's type system to look like Scala's, have very little to do with better representations of existentials, and belong in a follow-up proposal.<br><br>Austin<br><br><blockquote type="cite">On May 16, 2016, at 11:55 PM, Brent Royal-Gordon via swift-evolution <swift-evolution@swift.org> wrote:<br><br><blockquote type="cite">But don't you mean the union type of all possible Collection types when you write Any<Collection>?<br></blockquote><br>No, I mean "an existential capable of holding any Collection".<br><br>If I write Any<Equatable, Collection>, I mean "an existential capable of holding any Equatable Collection".<br><br>If I write Any<UITableViewCell, CounterDisplaying>, I mean "an existential capable of holding any CounterDisplaying UITableViewCell".<br><br>If I write Any<Collection where .Element: Equatable>, I mean "an existential capable of holding any Collection with an Equatable Element".<br><br>If I write Any<class>, I mean "An existential capable of holding any class instance".<br><br>If I write Any, I mean "An existential capable of holding anything".<br><br>Union types have nothing to do with it.<br><br>-- <br>Brent Royal-Gordon<br>Architechies<br><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>