<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>If I recall correctly before Swift 3 something like <code>protocol C : protocol<A, B> {}</code> was allowed, but it’s banned now.</p>
<p>If I understood your opinion than you’re leaning towards:</p>
<pre><code class="swift">protocol A {}
protocol B {}
class Super {}
class X : Super
typealias AB = A & B
typealias SuperA = Super & A
class Y : SuperA {} // Okay
class Z : X, SuperA {} // Okay because `X` is a subclass of `Super`
class ZZ : X {}
extension ZZ : SuperA {} // Okay because `ZZ` an descendant of `Super`
extension Y : AB {} // Okay
extension Z : AB {} // Okay
protocol P : SuperA {} // Banned, because it contains a concrete class type
protocol Q : AB {} // Okay
</code></pre>
<p>Plus as you mentioned allowing conforming to/inheriting from something like <code>A & B</code> directly.</p>
<p>One question that comes to my mind: would the latter not imply people of writing code like this <code>class Xyz : SuperClass & P & Q</code> instead of <code>class Xyz : SuperClass, P, Q</code>? Isn’t that the exact reason why it’s banned today?</p>
<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_1487066404356840192" 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 14. Februar 2017 um 10:57:34, Slava Pestov (<a href="mailto:spestov@apple.com">spestov@apple.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;" class=""><div></div><div>
<title></title>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 14, 2017, at 1:30 AM, Adrian Zubarev
<<a href="mailto:adrian.zubarev@devandartist.com" class="">adrian.zubarev@devandartist.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; 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; background-color: rgb(254, 254, 254);">
<p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">
Why can’t we completely ban this?</p>
<pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code class="swift" style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;">protocol A {}
protocol B {}
typealias AB = A & B
protocol C : AB {} // Allowed, but could be also banned
protocol D : A & B {} // Error
</code></pre>
<div style="margin: 15px 0px;" class=""><br class="webkit-block-placeholder"></div>
</div>
</div>
</blockquote>
<div><br class=""></div>
I didn’t even know the last one there was banned. /me hangs head in
shame.</div>
<div><br class=""></div>
<div>I think either both should be supported, or neither one should
be supported. I’m leaning toward the former :-)</div>
<div><br class=""></div>
<div>However note that unlike protocols that inherit from classes,
this does not create any conceptual difficulties in the language;
it’s merely a syntactic quirk. I’m more concerned about banning
protocols that inherit from typealiases that contain classes.</div>
<div><br class=""></div>
<div>Slava</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class="bloop_original_html" style="font-family: Helvetica, Arial; font-size: 13px; 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; background-color: rgb(254, 254, 254);">
<div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div>
<br class="">
<div id="bloop_sign_1487064559862729984" class="bloop_sign">
<div style="font-family: helvetica, arial; font-size: 13px;" class="">-- <br class="">
Adrian Zubarev<br class="">
Sent with Airmail</div>
</div>
<br class="">
<p class="airmail_on" style="margin: 15px 0px;">Am 14. Februar 2017
um 10:25:43, Slava Pestov via swift-evolution (<a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a>) schrieb:</p>
<blockquote type="cite" class="clean_bq" style="margin: 15px 0px;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class=""></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></span>
<div class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px;"><span style="margin-top: 0px; margin-bottom: 0px;" class="">On Feb 12, 2017, at
12:32 PM, David Hart via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>>
wrote:</span></div>
<span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="Apple-interchange-newline"></span>
<div class="" style="margin-bottom: 0px;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<span style="margin-top: 0px; margin-bottom: 0px;" class="">Hi
Matthew,</span>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></span></div>
<div class=""><span style="margin-top: 0px; margin-bottom: 0px;" class="">Your arguments made sense to me. I modified the proposal
to choose strategy number 3: deprecating and removing<span class="Apple-converted-space"> </span><b class="">class</b><span class="Apple-converted-space"> </span>over
several versions to favour<span class="Apple-converted-space"> </span><b class="">AnyObject</b>.
Mind having another proof read?</span></div>
<div class=""><br class=""></div>
<div class=""><a href="https://github.com/hartbit/swift-evolution/blob/subclass-existentials/proposals/XXXX-subclass-existentials.md" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">
https://github.com/hartbit/swift-evolution/blob/subclass-existentials/proposals/XXXX-subclass-existentials.md</a></div>
<div class=""><br class=""></div>
<div class="">Anybody has counter arguments?</div>
<div class=""><br class=""></div>
<div class="">
<h1 class="" style="font-weight: bold; color: rgb(51, 51, 51); font-size: 28pt; box-sizing: border-box; margin-right: 0px; margin-bottom: 16px; margin-left: 0px; line-height: 1.25; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255); margin-top: 0px !important;">
Class and Subtype existentials</h1>
<ul class="" style="margin: 0px 0px 16px; box-sizing: border-box; padding-left: 2em; color: rgb(51, 51, 51); 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);">
<li class="" style="margin: 15px 0px; box-sizing: border-box;">
Proposal: <a href="https://github.com/hartbit/swift-evolution/blob/subclass-existentials/proposals/XXXX-subclass-existentials.md" class="" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">SE-XXXX</a></li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">
Authors: <a href="http://github.com/hartbit/" class="" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">David
Hart</a>, <a href="http://github.com/austinzheng" class="" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">Austin
Zheng</a></li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">Review Manager:
TBD</li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">Status: TBD</li>
</ul>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-introduction" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#introduction" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Introduction</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
This proposal brings more expressive power to the type system by
allowing Swift to represent existentials of classes and subtypes
which conform to protocols.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-motivation" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#motivation" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Motivation</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
Currently, the only existentials which can be represented in Swift
are conformances to a set of protocols, using the <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">&</code>protocol
composition syntax:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;">Protocol1 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> Protocol2</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
On the other hand, Objective-C is capable of expressing
existentials of classes and subclasses conforming to protocols with
the following syntax:</p>
<div class="highlight highlight-source-objc" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">id</span><Protocol1, Protocol2>
Base<Protocol>*</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
We propose to provide similar expressive power to Swift, which will
also improve the bridging of those types from Objective-C.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-proposed-solution" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#proposed-solution" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Proposed solution</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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 proposal keeps the existing <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">&</code> syntax
but allows the first element, and only the first, to be either
the <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code>keyword
or of class type. The equivalent to the above Objective-C types
would look like this:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> Protocol1 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> Protocol2
<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Base</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> Protocol</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
As in Objective-C, the first line is an existential of classes
which conform to <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">Protocol1</code> and <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">Protocol2</code>,
and the second line is an existential of subtypes
of <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">Base</code> which
conform to <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">Protocol</code>.</p>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
Here are the new proposed rules for what is valid in a existential
conjunction syntax:</p>
<h3 class="" style="font-weight: bold; font-size: 1.25em; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-1-the-first-element-in-the-protocol-composition-syntax-can-be-the-anyobject-keyword-to-enforce-a-class-constraint" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#1-the-first-element-in-the-protocol-composition-syntax-can-be-the-anyobject-keyword-to-enforce-a-class-constraint" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>1. The first element in the protocol composition syntax
can be the <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: inherit; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code> keyword
to enforce a class constraint:</h3>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">protocol</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">P</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">struct</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">S</span> : <span class="pl-e" style="box-sizing: border-box; color: rgb(121, 93, 163);">P </span>{}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">C</span> : <span class="pl-e" style="box-sizing: border-box; color: rgb(121, 93, 163);">P </span>{}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> t<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> P <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span> <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiler error: AnyObject requirement must be in first position</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> u<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">S</span>() <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiler error: S is not of class type</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> v<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">C</span>() <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiles successfully</span></pre></div>
<h3 class="" style="font-weight: bold; font-size: 1.25em; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-2-the-first-element-in-the-protocol-composition-syntax-can-be-a-class-type-to-enforce-the-existential-to-be-a-subtype-of-the-class" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#2-the-first-element-in-the-protocol-composition-syntax-can-be-a-class-type-to-enforce-the-existential-to-be-a-subtype-of-the-class" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>2. The first element in the protocol composition syntax
can be a class type to enforce the existential to be a subtype of
the class:</h3>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">protocol</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">P</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">struct</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">S</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">C</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">D</span> : <span class="pl-e" style="box-sizing: border-box; color: rgb(121, 93, 163);">P </span>{}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">E</span> : <span class="pl-e" style="box-sizing: border-box; color: rgb(121, 93, 163);">C</span>, <span class="pl-e" style="box-sizing: border-box; color: rgb(121, 93, 163);">P </span>{}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> t<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> P <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> C <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiler error: subclass constraint must be in first position</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> u<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> S <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiler error: S is not of class type</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> v<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> C <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">D</span>() <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiler error: D is not a subtype of C</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> w<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> C <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">E</span>() <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Compiles successfully</span></pre></div>
<h3 class="" style="font-weight: bold; font-size: 1.25em; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-3-when-a-protocol-composition-type-contains-a-typealias-the-validity-of-the-type-is-determined-using-the-following-steps" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#3-when-a-protocol-composition-type-contains-a-typealias-the-validity-of-the-type-is-determined-using-the-following-steps" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>3. When a protocol composition type contains a typealias,
the validity of the type is determined using the following
steps:</h3>
<ul class="" style="margin: 0px 0px 16px; box-sizing: border-box; padding-left: 2em; color: rgb(51, 51, 51); 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);">
<li class="" style="margin: 15px 0px; box-sizing: border-box;">
Expand the typealias</li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">Normalize the
type by removing duplicate constraints and replacing less specific
constraints by more specific constraints (a <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> constraint
is less specific than a class type constraint, which is less
specific than a constraint of a subclass of that class).</li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">Check that the
type does not contain two class-type constraints</li>
</ul>
</div>
</div>
</div>
</blockquote>
<div class=""><br class=""></div>
You could generalize this and instead say that if the type contains
two class-type constraints, the resulting existential type is the
common base class of the two classes, or AnyObject if they do not
share a common base class.</div>
<div class=""><br class=""></div>
<div class="">Also, I’d like to see some discussion about
class-constrained existentials appearing in the inheritance clause
of a protocol. IMHO, we should ban this:</div>
<div class=""><br class=""></div>
<div class="">typealias MyType = SomeClass & SomeProtocol</div>
<div class=""><br class=""></div>
<div class="">protocol SomeOtherProtocol : MyType {}</div>
<div class=""><br class=""></div>
<div class="">Slava</div>
<div class=""><br class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class="">
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">C</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">D</span> : <span class="pl-e" style="box-sizing: border-box; color: rgb(121, 93, 163);">C </span>{}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">E</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">protocol</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">P1</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">protocol</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">P2</span> {}
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA1</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P1
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA2</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P2
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA3</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> C <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P2
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA4</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> D <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P2
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA5</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> E <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> P2
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA5</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> TA1 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> TA2
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Expansion: typealias TA5 = AnyObject & P1 & AnyObject & P2</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Normalization: typealias TA5 = AnyObject & P1 & P2 </span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> TA5 is valid</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA6</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> TA1 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> TA3
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Expansion: typealias TA6 = AnyObject & P1 & C & P2 </span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Normalization (AnyObject < C): typealias TA6 = C & P1 & P2 </span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> TA6 is valid</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA7</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> TA3 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> TA4
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Expansion: typealias TA7 = C & P2 & D & P2</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Normalization (C < D): typealias TA7 = D & P2</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> TA7 is valid</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">typealias</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">TA8</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> TA4 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> TA5
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Expansion: typealias TA8 = D & P2 & E & P2</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> Normalization: typealias TA8 = D & E & P2</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><span class="pl-c" style="box-sizing: border-box;">//</span> TA8 is invalid because the D and E constraints are incompatible</span></pre></div>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-class-and-anyobject" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#class-and-anyobject" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a><code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: inherit; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> and <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: inherit; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code></h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
This proposal merges the concepts of <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> and <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code>,
which now have the same meaning: they represent an existential for
classes. To get rid of the duplication, we suggest only
keeping <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code> around.
To reduce source-breakage to a minimum, <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> could
be redefined as <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">typealias
class = AnyObject</code> and give a deprecation warning
on <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> for
the first version of Swift this proposal is implemented in.
Later, <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> could
be removed in a subsequent version of Swift.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-source-compatibility" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#source-compatibility" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Source compatibility</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
This change will not break Swift 3 compability mode because
Objective-C types will continue to be imported as before. But in
Swift 4 mode, all types bridged from Objective-C which use the
equivalent Objective-C existential syntax could break code which
does not meet the new protocol requirements. For example, the
following Objective-C code:</p>
<div class="highlight highlight-source-objc" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">@interface</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">MyViewController</span>
- (<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">void</span>)<span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">setup</span><span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">:</span>(nonnull UIViewController<UITableViewDataSource,UITableViewDelegate>*)<span class="pl-smi" style="box-sizing: border-box;">tableViewController</span>;
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">@end</span></pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
is imported into Swift-3 mode as:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">MyViewController</span> {
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">setup</span>(<span class="pl-smi" style="box-sizing: border-box;"><span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">tableViewController</span></span>: UIViewController) {}
}</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
which allows calling the function with an invalid parameter:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> myViewController<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">:</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">MyViewController</span>()
myViewController.<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">setup</span>(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">UIViewController</span>())</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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 previous code continues to compile but still crashs if the
Objective-C code calls a method of <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">UITableViewDataSource</code> or <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">UITableViewDelegate</code>.
But if this proposal is accepted and implemented as-is, the
Objective-C code will be imported in Swift 4 mode as:</p>
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">class</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">MyViewController</span> {
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">setup</span>(<span class="pl-smi" style="box-sizing: border-box;"><span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">tableViewController</span></span>: UIViewController <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> UITableViewDataSource <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&</span> UITableViewDelegate) {}
}</pre></div>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
That would then cause the Swift code run in version 4 mode to fail
to compile with an error which states that <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">UIViewController</code> does
not conform to the <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">UITableViewDataSource</code> and <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">UITableViewDelegate</code> protocols.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-alternatives-considered" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#alternatives-considered" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Alternatives considered</h2>
<p class="" style="margin: 0px 0px 16px; box-sizing: border-box; color: rgb(51, 51, 51); 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);">
An alternative solution to the <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code>/<code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code> duplication
was to keep both, redefine <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code> as <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">typealias
AnyObject = class</code> and favor the latter when used as a
type name.</p>
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-acknowledgements" class="anchor" href="https://github.com/hartbit/swift-evolution/tree/subclass-existentials#acknowledgements" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>Acknowledgements</h2>
<div class="" style="box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); 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); margin-bottom: 0px !important;">
Thanks to <a href="http://github.com/austinzheng" class="" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">Austin
Zheng</a> and <a href="https://github.com/anandabits" class="" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects;">Matthew
Johnson</a> who brought a lot of attention to existentials in
this mailing-list and from whom most of the ideas in the proposal
come from.</div>
</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px;">On 9 Feb 2017, at 21:50,
Matthew Johnson <<a href="mailto:matthew@anandabits.com" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">matthew@anandabits.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="" style="margin-bottom: 0px;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<br class="">
<div class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px;">On Feb 9, 2017, at 2:44 PM,
David Hart <<a href="mailto:david@hartbit.com" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">david@hartbit.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="" style="margin-bottom: 0px;">
<div class="" 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;">
<br class="Apple-interchange-newline">
On 9 Feb 2017, at 20:43, Matthew Johnson via swift-evolution
<<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>>
wrote:<br class="">
<br class=""></div>
<blockquote type="cite" class="" style="margin: 15px 0px; 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;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<div class=""><br class="">
<br class="">
Sent from my iPad</div>
<div class=""><br class="">
On Feb 9, 2017, at 1:30 PM, Hooman Mehr via swift-evolution
<<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>>
wrote:<br class="">
<br class=""></div>
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<br class="">
<div class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px;">On Feb 9, 2017, at 10:47 AM,
Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>>
wrote:</div>
<div class="" style="margin-bottom: 0px;">
<div class="" 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;">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px;">On Feb 9, 2017, at 4:26 AM,
Step Christopher via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>>
wrote:</div>
<div class="" style="margin-bottom: 0px;">
<div dir="auto" class="">
<div class=""></div>
<div class="">
<div class=""></div>
<div class="">Looks good. Minor comments below:</div>
The typealias 'T5' is repeated as both an initial composition, and
as a demonstration of combining typealiases.
<div class=""><br class=""></div>
<div class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); 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);">
<pre class="" style="margin: 0px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 16px; word-break: normal; word-wrap: normal; box-sizing: border-box; line-height: 1.45;"><span class="" style="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);">This proposal merges the concepts of </span><code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 0px; margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code><span class="" style="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);"> and </span><code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 0px; margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code><span class="" style="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);">, which now have the same meaning: they represent an existential for classes. They are four solutions to this dilemna:</span></pre></div>
<ol class="" style="margin: 0px 0px 16px; box-sizing: border-box; padding-left: 2em; color: rgb(51, 51, 51); 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);">
<li class="" style="margin: 15px 0px; box-sizing: border-box;">Do
nothing.</li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">Replace all uses
of <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code> by <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code>,
breaking source compatibility.</li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">Replace all uses
of <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">class</code> by <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code>,
breaking source compatibility.</li>
<li class="" style="margin: 0.25em 0px 15px; box-sizing: border-box;">
Redefine <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">AnyObject</code> as <code class="" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px; padding: 0.2em 0px; word-break: normal; word-wrap: normal; box-sizing: border-box;">typealias
AnyObject = class</code>.</li>
</ol>
</div>
</blockquote>
I agree with other comments on recommending 4 here, and covering
the others as alternatives
<div class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<h2 class="" style="font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); color: rgb(51, 51, 51); font-size: 24px; box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);">
<a id="user-content-source-compatibility" class="anchor" href="https://github.com/hartbit/swift-evolution/blob/e6411d8a9e7924bbd8a48fc292bf08d58a8d1199/proposals/XXXX-subclass-existentials.md#source-compatibility" aria-hidden="true" style="color: rgb(64, 120, 192); background-color: transparent; text-decoration: none; box-sizing: border-box; -webkit-text-decoration-skip: objects; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16" style="">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" style=""></path>
</svg></a></h2>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<span class="" 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;">I
agree that we need the typealias for compatibility. I think it's
still worth discussing whether the `AnyObject` typealias should
*only* be there for compatibility; it could be deprecated or
obsoleted in Swift 4 or future language versions.</span></div>
</blockquote>
<div class=""><br class=""></div>
<div class="">I think it might be worth keeping to provide a more
sensible capitalization alternative than lower case “class” when
used as a type name:</div>
<div class=""><br class=""></div>
<div class="">var obj: class // this looks weird because of
capitalization.</div>
<div class=""><br class=""></div>
<div class="">
<div class="">var obj: AnyObject // this looks better.</div>
</div>
</div>
</div>
</blockquote>
<div class=""><br class=""></div>
<div class="">I agree that it looks better and would choose
AnyObject if source compatibility weren't an issue. One
option that wasn't listed was to drop 'class' but use a
multi-release deprecation strategy and a fix-it to facilitate a
smooth transition. If the community is willing to adopt this
approach it would be my first choice.</div>
</div>
</blockquote>
<div class="" 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;">
<br class=""></div>
<div class="" 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;">
You mean option 3?</div>
</div>
</blockquote>
<div class=""><br class=""></div>
<div class="">Pretty much, but option 3 does not make it clear that
it won’t break source immediately in Swift 4. I think it
becomes much more reasonable if Swift 3.1 code still compiles in
Swift 4 mode, but with a deprecation warning.</div>
<div class=""><br class=""></div>
<div class="">The reason I prefer `AnyObject` to `class` is because
I think it’s ugly to have `class` as the name of an existential
type. Type names are uppercase in Swift. It is also
used to compose with protocols which also use uppercase names in
Swift. Because it appears in contexts which use an uppercase
convention it makes sense for this to have an uppercase name.
`AnyObject` seems like the obvious choice if we’re going to
go in that direction.</div>
<br class="">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<br class="" 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;">
<blockquote type="cite" class="" style="margin: 15px 0px; 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;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<div class="">
<div class="">
<div class=""><br class=""></div>
</div>
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<div class="" 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;">
<br class=""></div>
<div class="" 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;">
-Joe</div>
<span class="" 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;">_______________________________________________</span><br class="" 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;">
<span class="" 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;">
swift-evolution mailing list</span><br class="" 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;">
<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none; 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;">
swift-evolution@swift.org</a><br class="" 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;">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none; 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;">
https://lists.swift.org/mailman/listinfo/swift-evolution</a></div>
</blockquote>
</div>
<br class=""></div>
</blockquote>
<blockquote type="cite" class="" style="margin: 15px 0px;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<span class="">_______________________________________________</span><br class="">
<span class="">swift-evolution mailing list</span><br class="">
<span class=""><a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">
swift-evolution@swift.org</a></span><br class="">
<span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">
https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class="">
</div>
</blockquote>
</div>
</blockquote>
<blockquote type="cite" class="" style="margin: 15px 0px; 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;">
<div class="" style="margin-top: 0px; margin-bottom: 0px;">
<span class="">_______________________________________________</span><br class="">
<span class="">swift-evolution mailing list</span><br class="">
<span class=""><a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">
swift-evolution@swift.org</a></span><br class="">
<span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">
https://lists.swift.org/mailman/listinfo/swift-evolution</a></span></div>
</blockquote>
</div>
</blockquote>
</div>
<br class=""></div>
</div>
</blockquote>
</div>
<br class=""></div>
</div>
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">
swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</div>
</blockquote>
</div>
<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div>
</div>
</blockquote>
</div>
<div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; 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; background-color: rgb(254, 254, 254);">
</div>
</div>
</blockquote>
</div>
<br class="">
</div></div></span></blockquote></div><div class="bloop_markdown"><p></p></div></body></html>