<html><head><style>
body {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        padding:1em;
        margin:auto;
        background:#fefefe;
}
h1, h2, h3, h4, h5, h6 {
        font-weight: bold;
}
h1 {
        color: #000000;
        font-size: 28pt;
}
h2 {
        border-bottom: 1px solid #CCCCCC;
        color: #000000;
        font-size: 24px;
}
h3 {
        font-size: 18px;
}
h4 {
        font-size: 16px;
}
h5 {
        font-size: 14px;
}
h6 {
        color: #777777;
        background-color: inherit;
        font-size: 14px;
}
hr {
        height: 0.2em;
        border: 0;
        color: #CCCCCC;
        background-color: #CCCCCC;
display: inherit;
}
p, blockquote, ul, ol, dl, li, table, pre {
        margin: 15px 0;
}
a, a:visited {
        color: #4183C4;
        background-color: inherit;
        text-decoration: none;
}
#message {
        border-radius: 6px;
        border: 1px solid #ccc;
        display:block;
        width:100%;
        height:60px;
        margin:6px 0px;
}
button, #ws {
        font-size: 12 pt;
        padding: 4px 6px;
        border-radius: 5px;
        border: 1px solid #bbb;
        background-color: #eee;
}
code, pre, #ws, #message {
        font-family: Monaco;
        font-size: 10pt;
        border-radius: 3px;
        background-color: #F8F8F8;
        color: inherit;
}
code {
        border: 1px solid #EAEAEA;
        margin: 0 2px;
        padding: 0 5px;
}
pre {
        border: 1px solid #CCCCCC;
        overflow: auto;
        padding: 4px 8px;
}
pre > code {
        border: 0;
        margin: 0;
        padding: 0;
}
#ws { background-color: #f8f8f8; }
.bloop_markdown table {
border-collapse: collapse;
font-family: Helvetica, arial, freesans, clean, sans-serif;
color: rgb(51, 51, 51);
font-size: 15px; line-height: 25px;
padding: 0; }
.bloop_markdown table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
.bloop_markdown table tr:nth-child(2n) {
background-color: #f8f8f8; }
.bloop_markdown table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
.bloop_markdown table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
.bloop_markdown table tr th :first-child, table tr td :first-child {
margin-top: 0; }
.bloop_markdown table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
.bloop_markdown blockquote{
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
code, pre, #ws, #message {
word-break: normal;
word-wrap: normal;
}
hr {
display: inherit;
}
.bloop_markdown :first-child {
-webkit-margin-before: 0;
}
code, pre, #ws, #message {
font-family: Menlo, Consolas, Liberation Mono, Courier, monospace;
}
.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="bloop_markdown"><p>Here are a few thoughts on how I imagine these existentials to look like.</p>
<pre><code class="swift">// We now write the `where` clause all the way at the end.
// SE-0142 does follow that route as well.
// I think there is no need for a leading dot in existentials, similar to the where clause from SE-0142.
typealias MyConstrainedView = Any<UIView, MyProtocol> where AssociatedType == SomeType
// Shorthand form
typealias MyConstrainedView = UIView & MyProtocol where AssociatedType == SomeType
// If there is a clash of two associated types with the same name, which both comes from a different protocol, we should be explicit there and prefix them with `ProtocolName.`
typealias A = Any<P1, P2> where P1.AssociatedType == SomeType, P2.AssociatedType == SomeOtherType
</code></pre>
<p>Overlapping classes that share some subtype relationship should provide a fix-it warning and merge.</p>
<pre><code class="swift">// Warning
Any<UIView, NSObject, SomeProtocol>
// Fixed
Any<UIView, SomeProtocol>
// Simpler
UIView & SomeProtocol
</code></pre>
<p></p></div><div class="bloop_original_html"><style>body{font-family:Helvetica,Arial;font-size:13px}</style><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div> <br> <div id="bloop_sign_1484758445227777024" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <br><p class="airmail_on">Am 18. Januar 2017 um 17:46:20, Adrian Zubarev (<a href="mailto:adrian.zubarev@devandartist.com">adrian.zubarev@devandartist.com</a>) schrieb:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div>
<title></title>
<div class="bloop_markdown">
<p>Hi there,</p>
<p>From my current perspective, my draft is way to0 outdated and
ugly. :D And I myself will be very busy in the next two month, so
please don’t count on me for now.</p>
<p>But I will follow the topic and write some feedback as good as I
only can.</p>
</div>
<div class="bloop_original_html">
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<br>
<div id="bloop_sign_1484757705640491008" class="bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
-- <br>
Adrian Zubarev<br>
Sent with Airmail</div>
</div>
<br>
<p class="airmail_on">Am 18. Januar 2017 um 17:41:11, Austin Zheng
(<a href="mailto:austinzheng@gmail.com">austinzheng@gmail.com</a>)
schrieb:</p>
<blockquote type="cite" class="clean_bq">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div><span>I probably won't have time, unfortunately. I think
Adrian Zubarev (cc'ed) had a draft for this proposal at some point,
so you might want to work with him.</span>
<div class=""><span><br class=""></span></div>
<div class=""><span>Austin<br class=""></span>
<div class=""><span><br class=""></span>
<div>
<blockquote type="cite" class="">
<div class=""><span>On Jan 17, 2017, at 11:48 PM, David Hart
<<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> wrote:</span></div>
<span><br class="Apple-interchange-newline"></span>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span>Austin? Do you want/have time to split out the
Superclass + Protocol proposal? If not, I can do it. Let me
know.</span>
<div class=""><span>David.<br class=""></span>
<div class=""><span><br class=""></span>
<div class="">
<blockquote type="cite" class="">
<div class=""><span>On 18 Jan 2017, at 00:27, Douglas Gregor
<<a href="mailto:dgregor@apple.com" class="">dgregor@apple.com</a>> wrote:</span></div>
<span><br class="Apple-interchange-newline"></span>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span><br class=""></span>
<div class="">
<blockquote type="cite" class="">
<div class=""><span>On Jan 10, 2017, at 10:21 PM, David Hart
<<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> wrote:</span></div>
<span><br class="Apple-interchange-newline"></span>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span>What do you think I should do then? Start an
official proposal for Superclass + Protocol because that’s all we
can afford to have for Swift 4 or bug Austin to resubmit his full
proposal?</span></div>
</div>
</blockquote>
<div class=""><span><br class=""></span></div>
<div class=""><span>I think it makes sense to split out the
more-Swift-4-critical Superclass + Protocol bit, because it affects
the import of Objective-C APIs in a manner that breaks source code.
Reading the tea leaves, I can’t imagine having time to implement
the full generalized-extensions proposal in Swift 4.</span></div>
<div class=""><span><br class=""></span></div>
<span>- Doug</span></div>
<div class=""><span><br class=""></span>
<blockquote type="cite" class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class=""><span><br class=""></span></div>
<div class=""><span>David.<br class=""></span>
<div class=""><span><br class=""></span>
<div class="">
<blockquote type="cite" class="">
<div class=""><span>On 11 Jan 2017, at 00:09, Douglas Gregor
<<a href="mailto:dgregor@apple.com" class="">dgregor@apple.com</a>> wrote:</span></div>
<span><br class="Apple-interchange-newline"></span>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span><br class=""></span>
<div class="">
<blockquote type="cite" class="">
<div class=""><span>On Jan 8, 2017, at 8:21 AM, David Hart
<<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> wrote:</span></div>
<span><br class="Apple-interchange-newline"></span>
<div class="">
<blockquote type="cite" 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-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><span><br class="Apple-interchange-newline">
On 8 Jan 2017, at 06:17, Douglas Gregor via swift-evolution
<<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class="">
<br class="">
<br class="">
<br class="">
Sent from my iPhone<br class="">
<br class=""></span>
<blockquote type="cite" class=""><span>On Jan 6, 2017, at 11:04 PM,
Russ Bishop <<a href="mailto:xenadu@gmail.com" class="">xenadu@gmail.com</a>> wrote:<br class="">
<br class="">
<br class=""></span>
<blockquote type="cite" class=""><span>On Jan 4, 2017, at 8:48 PM,
Douglas Gregor via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class="">
<br class="">
<br class=""></span>
<blockquote type="cite" class=""><span><br class="">
Would love to see this come forward into discussion.<br class=""></span></blockquote>
<span><br class="">
Yeah. I'm less sure about the other enhancements to existentials
fitting into Swift 4, e.g., the creation of existentials for
protocols with associated types. Although important, it's a big
feature that will take a bunch of design and implementation time,
and I'm leery of accepting something that we might not actually be
able to achieve.<span class="Apple-converted-space"> </span><br class="">
<br class="">
- Doug<br class=""></span></blockquote>
<br class="">
By this are you referring to generalized existentials?<br class=""></blockquote>
<br class="">
Yes. I actually prefer the term "generalized
existentials".<br class="">
<br class="">
<blockquote type="cite" class="">If so I’ll say this is such a
constant pain point and perverts so many API designs… not to
mention vomiting AnyXYZ type-erased wrappers everywhere… In my
completely non-authoritative personal opinion we shouldn’t ship
Swift 4 without it :)<br class=""></blockquote>
<br class="">
To be absolutely clear, I think this is an extremely important
feature. It's also a significant undertaking in both design and
implementation.<span class="Apple-converted-space"> </span><br class=""></blockquote>
<br 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="">
<span 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; float: none; display: inline !important;" class="">Hasn't most of the design work already been done by Austin
and all those participating back then? What is missing? How much of
the original proposal is possible to implement in the Swift 4 (on
top of Superclass + Protocol)? Just want some hints on how to drive
this so we can get as much of generalized existentials for Swift
4.</span><br 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>
</blockquote>
</div>
<div class=""><br class=""></div>
Yes, that’s fair: the proposal is in excellent shape, and I
(personally) agree with most (maybe all) of the design decisions in
it.<br class="">
<div class=""><br class=""></div>
<div class="">- Doug</div>
<div class=""><br class=""></div>
</div>
</div>
</blockquote>
</div>
<br class=""></div>
</div>
</div>
</div>
</blockquote>
</div>
<br class=""></div>
</div>
</blockquote>
</div>
<br class=""></div>
</div>
</div>
</div>
</blockquote>
</div>
<br class=""></div>
</div>
</div>
</div>
</blockquote>
</div>
<div class="bloop_markdown"></div>
</div></div></span></blockquote></div><div class="bloop_markdown"><p></p></div></body></html>