<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 22, 2017, at 7:12 AM, Karl Wagner &lt;<a href="mailto:razielim@gmail.com" class="">razielim@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Do we support where clauses on these existentials? For example, can I write:<div id="edo-signature" style="font-family: 'Helvetica Neue', Helvetica, Helvetica, Arial, sans-serif;" class=""></div></div><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">func doSomething&lt;T&gt;(_: NSObject &amp; Collection where Iterator.Element == T)</div><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">The proposal says nothing about where clauses.</div></div></blockquote><div><br class=""></div><div>No, this proposal does not enable where clauses on existentials. That’s gone under the name “generalized existentials” or “enhanced existentials” as a separate (post-Swift-4) feature.</div><div><br class=""></div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""><blockquote type="cite" class=""><div class=""><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div id="edo-message" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">- Karl</div><div id="edo-original" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><br class=""><br class=""><blockquote type="cite" style="margin: 1ex 0px 0px; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 0.5ex;" class=""><div class="">On Mar 20, 2017 at 7:00 pm, &lt;<a href="mailto:swift-evolution@swift.org" class="">Douglas Gregor via swift-evolution</a>&gt; wrote:<br class=""><br class=""></div><div class=""><p class="" 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;">Proposal link:</p><blockquote class="" 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);"><div class="" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;"><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 class="" 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);"><br class=""></p><p class="" 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);">Hello Swift community,</p><p class="" 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);">The review of SE-0156 “Class and Subtype Existentials” ran from February 28...March 7, 2017. The proposal was very well-received and is<span class="Apple-converted-space">&nbsp;</span><b class="">accepted</b><span class="Apple-converted-space">&nbsp;</span>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 &amp; P” would be well-formed but&nbsp;“P &amp; 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&nbsp;ordering rules&nbsp;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&nbsp;introduced more complexity than they provided clarity, and therefore do not belong in the language.&nbsp;</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<span class="Apple-converted-space">&nbsp;</span><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><span class="Apple-converted-space">&nbsp;</span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div></div></div></blockquote></div><br class=""></body></html>