<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>As i said, already deeply regretted mentioning P|Q as on closer examination of a well known precedent it is very realistic to have P&amp;Q only.<br><div>Apologize again for not doing the due dilligence before pressing send.</div>(From<span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">&nbsp;mobile)</span></div><div><br>On Jun 27, 2016, at 7:04 PM, Austin Zheng &lt;<a href="mailto:austinzheng@gmail.com">austinzheng@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I think the rationale thread for the original version of this proposal pretty much shut down the possibility of disjunctive type constraints. In fact, the primary argument against '&amp;' was that it would encourage conversations about '|'.<div><br></div><div>It's also been added to the commonly rejected proposals list:&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md">https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 9:48 AM, Joe Groff via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Jun 25, 2016, at 12:00 AM, L. Mihalkovic &lt;<a href="mailto:laurent.mihalkovic@gmail.com">laurent.mihalkovic@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Inline<br>
&gt; Regards<br>
&gt; (From mobile)<br>
&gt;<br>
&gt;&gt; On Jun 25, 2016, at 1:00 AM, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Jun 23, 2016, at 8:55 PM, Jordan Rose via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; [Proposal: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0095-any-as-existential.md" rel="noreferrer" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0095-any-as-existential.md</a> ]<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I’ve gone on record before as against this syntax, although when I set out earlier today to record my usual rebuttal I found that it really was mostly a matter of taste. Yes, this looks weird to me:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; let callback: (Data) -&gt; NSCoding &amp; NSCopying<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; but I’m sure the infix ‘-&gt;’ for functions looked weird to everyone the first time they saw it as well, and it really is pretty clear in argument position.<br>
&gt;&gt;<br>
&gt;&gt; We could conceivably bracket the 'where' constraints somewhere. It's nice not to have to punish the common case syntax. In my personal ideal vision of the world, I'd like to see us support opening existentials via path-dependent types (e.g., let a: Collection; let element: a.Element). If we support them in decl-level 'where' clauses, we provide a nice, clean syntax for complex generic relationships that doesn't require angle brackets or per-existential where clauses at all, something like:<br>
&gt;&gt;<br>
&gt;&gt;&nbsp; &nbsp;func intersect(a: Collection, b: Collection) -&gt; Collection<br>
&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp;where a.Element == b.Element, b.Element == return.Element {<br>
&gt;&gt;&nbsp; &nbsp;}<br>
&gt;&gt;<br>
&gt;&gt; which doesn't completely define away the need for 'where' as part of existential types, but would shrink it quite a bit.<br>
&gt;<br>
&gt; For some reason it had not clicked until your 'path dependent type' reference how reminicent of (U+00B7) this is. I watched nada's 2014 presentation again... but then it means intersection types would add a lot... you guys seem ok to add P&amp;Q now, so why not take that opportunity to allow P|Q at the same time. Does it also mean that you might consider at some point expanding 'assoctype U'&nbsp; into:&nbsp; T where &lt;:U , :&gt;U&nbsp; opening the door to lower/higher type bounds?<br>
<br>
</span>Let's not rathole on the P|Q thing. Disjunctions are difficult to make much sense of in a parametric type system like ours; there are plenty of other threads on this mailing list discussing it.<br>
<br>
-Joe<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</div></div></blockquote></div><br></div>
</div></blockquote></body></html>