<html><body><div id="edo-message">Do we support where clauses on these existentials? For example, can I write:<style>#edo-signature img {max-width: 90%}</style><div id="edo-signature" style="font-family: 'Helvetica Neue','Helvetica',Helvetica,Arial,sans-serif;font:'-apple-system-body';"></div></div><div id="edo-message"><br></div><div id="edo-message">func doSomething<T>(_: NSObject & Collection where Iterator.Element == T)</div><div id="edo-message"><br></div><div id="edo-message">The proposal says nothing about where clauses.</div><div id="edo-message"><br></div><div id="edo-message">- Karl</div><div id="edo-original"><div><br><br><blockquote type="cite" style="margin:1ex 0 0 0;border-left:1px #ccc solid;padding-left:0.5ex;"><div>On Mar 20, 2017 at 7:00 pm, <<a href="mailto:swift-evolution@swift.org">Douglas Gregor via swift-evolution</a>> wrote:<br><br></div><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><p style="color: rgb(106, 115, 125); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;" class="">Proposal link:</p><blockquote style="background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><font color="#6a737d" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md</a></font></div></blockquote><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><br class=""></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Hello Swift community,</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">The review of SE-0156 “Class and Subtype Existentials” ran from February 28...March 7, 2017. The proposal was very well-received and is <b class="">accepted</b> with one modification: the ordering rules for existential types that involve AnyObject or a class type will be removed.</p><div class=""><font face=".SF NS Text" class=""><font size="3" class="">The ordering rules were intended to improve code clarity by requiring that the class (or AnyObject) constraint come first—“AnyObject & P” would be well-formed but “P & AnyObject” would be an error—enforcing more uniformity for Swift code and echoing a similar restriction that already exists for class definitions, where the superclass must come first. However, the ability to compose typealiases complicated the ordering rules considerably, and—<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170227/033365.html" class="">as noted by Matthew Johnson</a>—don’t provide the guarantee that the class constraint will always be first. Therefore, the core team felt that the resulting ordering rules introduced more complexity than they provided clarity, and therefore do not belong in the language. </font></font></div><div class=""><font size="3" face=".AppleSystemUIFont" class=""><br class=""></font></div><div class=""><font face=".AppleSystemUIFont" size="3" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Thanks,</font></div><div class=""><font face=".AppleSystemUIFont" size="3" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Doug Gregor, Review Manager</font></div><div class=""><br class=""></div>_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution
</div></blockquote></div></div></body></html>