<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>Because <code>someInstance["key", .string("key1"), .integer(1), .string(stringKeyInstance), .integer(intIndexInstance), .integer(intIndexInstance), …]</code> is simply ugly and should be hidden. Such API looks horrible.</p>

<p>Is this discussion really going to end with every statement being questioned with “why”? Why is 42 the number that rules the universe?</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_1487545491369880064" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">--&nbsp;<br>Adrian Zubarev<br>Sent with Airmail</div></div> <br><p class="airmail_on">Am 20. Februar 2017 um 00:03:44, Xiaodi Wu (<a href="mailto:xiaodi.wu@gmail.com">xiaodi.wu@gmail.com</a>) schrieb:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>


<title></title>


<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sun, Feb 19, 2017 at 4:51 PM, Adrian
Zubarev <span dir="ltr">&lt;<a href="mailto:adrian.zubarev@devandartist.com" target="_blank">adrian.zubarev@devandartist.com</a>&gt;</span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div class="m_2275515528959643236bloop_markdown">
<p>Matthew has pretty much summed up everything with a single
question in his last reply. It makes me tired of repeating myself
over and over again.</p>
<p>Here’s the challenge for you:</p>
<p>Implement a subscript where the first parameter is a String
(trivial), but the second to n are String’s and/or Int’s. There is
no restriction of order for the Int’s and String’s and there could
be as many as you’d like, so no overloads are allowed (a hint:
variadics). You should be able to use variables in that subscript
and literals. You’re not allowed to use enum constructors</p>
</div>
</div>
</blockquote>
<div>Why not? You want a parameter that takes either String or Int.
In another language, you might express this as `String | Int`, but
Chris Lattner and others have said on this list that enums are the
intended way of expressing this in Swift.<br></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div class="m_2275515528959643236bloop_markdown">
<p>and the client should not be able to extend the set of types you
can pass to that subscript. That said it can look like this:
<code>someInstance["key", "key1", 1, stringKeyInstance,
intIndexInstance, intIndexInstance, …]</code></p>
<p>Creating hacks like unreachable types with hidden inits is
prohibited.</p>
<p>Have fun!</p>
</div>
<div class="m_2275515528959643236bloop_original_html">
<div id="m_2275515528959643236bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<span class=""><br></span></div>
<span class=""><br></span>
<div id="m_2275515528959643236bloop_sign_1487544005385085184" class="m_2275515528959643236bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
<span class="">--&nbsp;<br>
Adrian Zubarev<br>
Sent with Airmail</span></div>
</div>
<span class=""><br></span>
<div>
<div class="h5">
<p class="m_2275515528959643236airmail_on">Am 19. Februar 2017 um
23:25:11, Xiaodi Wu (<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>) schrieb:</p>
<blockquote type="cite" class="m_2275515528959643236clean_bq">
<div>
<div>
<div dir="ltr"><span>Sorry, I have read through this thread twice
and do not understand the point you are making. Can you explain
your example once more?</span>
<div><span><br></span></div>
<div><span>Specifically, I do not understand why it is that your
code should have problems with third-party types that conform to
your protocol. If your protocol has requirements that third-party
types cannot fulfill, then naturally those requirements will
prevent a third-party from conforming new types to your protocol.
OTOH, if your protocol does not have any requirements that
third-party types cannot fulfill, then your code that accepts
anything that conforms to your protocol should be indifferent to
whether the conforming type is defined by you or someone else.
After all, a conforming type would fulfill all the semantic and
syntactic requirements of the protocol! If your protocol has
requirements that you are unable to state in code, causing
third-party types to conform that really shouldn't, then that is a
case for additional features that allow you to express those
requirements more accurately, not an argument for having protocols
that can't be conformed to by a third-party. What am I
missing?</span></div>
<div><span><br></span>
<div>
<div class="gmail_extra"><span><br></span>
<div class="gmail_quote"><span>On Sun, Feb 19, 2017 at 11:53 AM,
Adrian Zubarev via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span>
wrote:<br></span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div id="m_2275515528959643236m_2643987633502928267bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
That’s the whole point I was making. :) Thank you Matthew. That
makes my example a real world example and not just some bike
shedding.</div>
<span><br></span>
<div id="m_2275515528959643236m_2643987633502928267bloop_sign_1487526717218961920" class="m_2275515528959643236m_2643987633502928267bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
<span>--&nbsp;<br>
Adrian Zubarev<br>
Sent with Airmail</span></div>
</div>
<span><br></span>
<div>
<div class="m_2275515528959643236h5">
<p class="m_2275515528959643236m_2643987633502928267airmail_on">Am
19. Februar 2017 um 18:50:31, Matthew Johnson (<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>) schrieb:</p>
<blockquote type="cite" class="m_2275515528959643236m_2643987633502928267clean_bq">
<div dir="auto">
<div>
<div><span><br>
<br>
Sent from my iPad</span></div>
<div><span><br>
On Feb 19, 2017, at 11:29 AM, David Waite via swift-evolution
&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
<br></span></div>
<blockquote type="cite">
<div><span>Just FYI, I solved this issue in my own library (which
included a json jpointer implementation) via:</span>
<div><span><span style="font-family:Menlo;font-size:18px;font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">
<br></span></span></div>
<div style="font-size:8px"><span style="font-family:Menlo;font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">
public</span> <span style="font-family:Menlo;font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">
enum</span> <span style="font-family:Menlo;font-size:13px;font-variant-ligatures:no-common-ligatures">
SubscriptParameter {</span></div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">case</span>
<span style="font-variant-ligatures:no-common-ligatures">string(</span><span style="font-variant-ligatures:no-common-ligatures;color:#703daa">String</span><span style="font-variant-ligatures:no-common-ligatures">)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">case</span>
<span style="font-variant-ligatures:no-common-ligatures">int(</span><span style="font-variant-ligatures:no-common-ligatures;color:#703daa">Int</span><span style="font-variant-ligatures:no-common-ligatures">)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:21px">
<br></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(97,34,174)">
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">extension</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#539aa4">SubscriptParameter</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">:</span>
<span style="font-variant-ligatures:no-common-ligatures">ExpressibleByIntegerLiteral</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">public</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">init</span><span style="font-variant-ligatures:no-common-ligatures">(integerLiteral
value:</span> <span style="font-variant-ligatures:no-common-ligatures;color:#703daa">Int</span><span style="font-variant-ligatures:no-common-ligatures">)
{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">self</span>
<span style="font-variant-ligatures:no-common-ligatures">=
.</span><span style="font-variant-ligatures:no-common-ligatures;color:#31595d">int</span><span style="font-variant-ligatures:no-common-ligatures">(value)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:21px">
<br></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(97,34,174)">
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">extension</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#539aa4">SubscriptParameter</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">:</span>
<span style="font-variant-ligatures:no-common-ligatures">ExpressibleByStringLiteral</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(33,150,28)">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;&nbsp;</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">public</span>
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">init</span><span style="font-variant-ligatures:no-common-ligatures">(stringLiteral
value:</span> <span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">String</span><span style="font-variant-ligatures:no-common-ligatures">)
{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">self</span>
<span style="font-variant-ligatures:no-common-ligatures">=
.</span><span style="font-variant-ligatures:no-common-ligatures;color:#31595d">string</span><span style="font-variant-ligatures:no-common-ligatures">(value)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">public</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">init</span><span style="font-variant-ligatures:no-common-ligatures">(extendedGraphemeClusterLi<wbr>teral
value:</span> <span style="font-variant-ligatures:no-common-ligatures;color:#703daa">String</span><span style="font-variant-ligatures:no-common-ligatures">)
{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">self</span><span style="font-variant-ligatures:no-common-ligatures">.</span><span style="font-variant-ligatures:no-common-ligatures;color:#c42275">init</span><span style="font-variant-ligatures:no-common-ligatures">(stringLiteral:
value)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
}</span></div>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:21px">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;&nbsp;</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">public</span>
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)">init</span><span style="font-variant-ligatures:no-common-ligatures">(unicodeScalarLiteral
value:</span> <span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">String</span><span style="font-variant-ligatures:no-common-ligatures">)
{</span></p>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">self</span><span style="font-variant-ligatures:no-common-ligatures">.</span><span style="font-variant-ligatures:no-common-ligatures;color:#c42275">init</span><span style="font-variant-ligatures:no-common-ligatures">(stringLiteral:
value)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:21px">
<br></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(97,34,174)">
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">extension</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#539aa4">SubscriptParameter</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">:</span>
<span style="font-variant-ligatures:no-common-ligatures">CustomStringConvertible</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">public</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">var</span>
<span style="font-variant-ligatures:no-common-ligatures">description:</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#703daa">String</span>
<span style="font-variant-ligatures:no-common-ligatures">{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(196,34,117)">
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures">switch</span>
<span style="font-variant-ligatures:no-common-ligatures">self</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">case</span>
<span style="font-variant-ligatures:no-common-ligatures">.</span><span style="font-variant-ligatures:no-common-ligatures;color:#31595d">string</span><span style="font-variant-ligatures:no-common-ligatures">(let
str):</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp; &nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">return</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#c81b13">"\"</span><span style="font-variant-ligatures:no-common-ligatures">\</span><span style="font-variant-ligatures:no-common-ligatures;color:#c81b13">(</span><span style="font-variant-ligatures:no-common-ligatures">str</span><span style="font-variant-ligatures:no-common-ligatures;color:#c81b13">)\""</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">case</span>
<span style="font-variant-ligatures:no-common-ligatures">.</span><span style="font-variant-ligatures:no-common-ligatures;color:#31595d">int</span><span style="font-variant-ligatures:no-common-ligatures">(let
i):</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp; &nbsp;</span> <span style="font-variant-ligatures:no-common-ligatures;color:#c42275">return</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#703daa">String</span><span style="font-variant-ligatures:no-common-ligatures">(i)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
&nbsp; }</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">&nbsp;
}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:21px">
<br></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures;color:#c42275">func</span>
<span style="font-variant-ligatures:no-common-ligatures">debug(</span><span style="font-variant-ligatures:no-common-ligatures;color:#c42275">_</span>
<span style="font-variant-ligatures:no-common-ligatures">path:</span><span style="font-variant-ligatures:no-common-ligatures;color:#539aa4">SubscriptParameter</span><span style="font-variant-ligatures:no-common-ligatures">...)
{</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(200,27,19)">
<span style="font-variant-ligatures:no-common-ligatures;color:#000000">&nbsp;</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#3e1e81">print</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">(</span><span style="font-variant-ligatures:no-common-ligatures">"path
is</span> <span style="font-variant-ligatures:no-common-ligatures;color:#000000">\</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">path</span><span style="font-variant-ligatures:no-common-ligatures">)"</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">}</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:21px">
<br></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(200,27,19)">
<span style="font-variant-ligatures:no-common-ligatures;color:#294c50">debug</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#0435ff">1</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">,</span>
<span style="font-variant-ligatures:no-common-ligatures">"foo"</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">,</span>
<span style="font-variant-ligatures:no-common-ligatures;color:#0435ff">2</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">,</span>
<span style="font-variant-ligatures:no-common-ligatures">"bar”</span><span style="font-variant-ligatures:no-common-ligatures;color:#000000">)
// path is [1, “foo”, 2, “bar”]</span></div>
</div>
</div>
</blockquote>
<div><br></div>
Can you make this work with variables - not just literals - and
still prevent users from extending the set of types and without
requiring an enum case constructor to be used by clients?
<div><br>
<div><br>
<blockquote type="cite">
<div>
<div>
<div><br></div>
<div>
<div>
<blockquote type="cite">
<div>On Feb 19, 2017, at 1:14 AM, Adrian Zubarev &lt;<a href="mailto:adrian.zubarev@devandartist.com" target="_blank">adrian.zubarev@devandartist.c<wbr>om</a>&gt;
wrote:</div>
<br class="m_2275515528959643236m_2643987633502928267Apple-interchange-newline">

<div>
<div class="m_2275515528959643236m_2643987633502928267bloop_markdown" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
<p style="margin:15px 0px">If you haven’t followed the other thread
Matthew previously opened than you have missed the example I showed
there.</p>
<p style="margin:15px 0px">Here it is again:</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"><code class="m_2275515528959643236m_2643987633502928267swift" 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">public protocol SubscriptParameterType {
         
    // This property was needed to prevent the client from breaking
    // the library by conforming to the protocol, but I'd like to      
    // keep it invisible for the client, or even better prevent the
    // client from conforming to the protocol.
    var parameter: Document.SubscriptParameter { get }
}

extension Document {
         
    public enum SubscriptParameter {
                 
        case string(String)
        case integer(Int)
    }
}

extension String : SubscriptParameterType {
         
    public var parameter: Document.SubscriptParameter {
             
        return .string(self)
    }
}

extension Int : SubscriptParameterType {
         
    public var parameter: Document.SubscriptParameter {
             
        return .integer(self)
    }
}

// Somewhere inside the `Document` type
public subscript(firstKey: String, parameters: SubscriptParameterType...) -&gt; Value? { … }
</code></pre>
<p style="margin:15px 0px">The absence of closed protocols forced
me to create a special requirement on that protocol to prevent the
client from conforming to that protocol and passing instances of
other types my API wouldn’t want to deal with. That creates
unnecessary copies and I need to unpack the enum payload to find
out which type the user passed. Instead I could simply close the
protocol, wouldn’t need the requirement to exist and I could simply
cast the type to<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">String</code><span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span>or<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">Int</code><span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span>when
needed.</p>
<p style="margin:15px 0px">That implementation enables more safe
queries of my Document type like</p>
<p style="margin:15px 0px"><code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
document["key1", intIndexInstance, stringKeyInstance, 10,
"key"]</code></p>
<p style="margin:15px 0px">rather than<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span></p>
<p style="margin:15px 0px"><code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
document["key1/\(intIndexInsta<wbr>nce)/\(stringKeyInstance)/10/<wbr>key"]</code>.</p>
<hr style="height:0.2em;border:0px;color:rgb(204,204,204);background-color:rgb(204,204,204);display:inherit">

<p style="margin:15px 0px">Here is a list of hidden and semi-hidden
protocols from the standard library that could be closed. Formatted
version:<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><a href="https://gist.github.com/DevAndArtist/168c800d784829be536c407311953ab7" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank">https://gist.github.c<wbr>om/DevAndArtist/168c800d784829<wbr>be536c407311953ab7</a></p>
<table style="margin:15px 0px;border-collapse:collapse;font-family:Helvetica,arial,freesans,clean,sans-serif;color:rgb(51,51,51);font-size:15px;line-height:25px;padding:0px">
<colgroup>
<col style="text-align:left">
<col style="text-align:center"></colgroup>
<thead>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<th style="font-weight:bold;border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
Path</th>
<th style="font-weight:bold;border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
Protocol</th>
</tr>
</thead>
<tbody>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/AnyH<wbr>ashable.swift:16</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_HasCustomAnyHashableRepresent<wbr>ation</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Bidi<wbr>rectionalCollection.swift:21</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_BidirectionalIndexable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Brid<wbr>geObjectiveC.swift:19</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ObjectiveCBridgeable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Coll<wbr>ection.swift:20</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_IndexableBase</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Coll<wbr>ection.swift:176</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_Indexable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:193</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinIntegerLi<wbr>teral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:240</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinFloatLite<wbr>ral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:283</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinBooleanLi<wbr>teral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:316</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinUnicodeSc<wbr>alarLiteral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:350</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinExtendedG<wbr>raphemeClusterLiteral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:398</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinStringLit<wbr>eral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:407</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByBuiltinUTF16Stri<wbr>ngLiteral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:670</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByStringInterpolat<wbr>ion</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:709</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByColorLiteral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:720</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByImageLiteral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:730</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ExpressibleByFileReferenceLit<wbr>eral</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Comp<wbr>ilerProtocols.swift:750</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_DestructorSafeContainer</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Fixe<wbr>dPoint.swift.gyb:53</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_Integer</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Fixe<wbr>dPoint.swift.gyb:70</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_SignedInteger</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Fixe<wbr>dPoint.swift.gyb:108</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_DisallowMixedSignArithmetic</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Hash<wbr>able.swift:16</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_Hashable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Inde<wbr>x.swift:16</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_Incrementable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Inte<wbr>gerArithmetic.swift.gyb:33</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_IntegerArithmetic</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Mirr<wbr>or.swift:721</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_DefaultCustomPlaygroundQuickL<wbr>ookable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Muta<wbr>bleCollection.swift:20</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_MutableIndexable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Newt<wbr>ypeWrapper.swift.gyb:16</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_SwiftNewtypeWrapper</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Poin<wbr>ter.swift:16</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_Pointer</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Rand<wbr>omAccessCollection.swift:20</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_RandomAccessIndexable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Rang<wbr>eReplaceableCollection.swift.<wbr>gyb:27</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_RangeReplaceableIndexable</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Refl<wbr>ectionLegacy.swift:41</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_Mirror</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:27</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ShadowProtocol</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:31</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSFastEnumeration</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:41</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSEnumerator</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:51</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSCopying</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:61</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSArrayCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:83</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSDictionaryCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:125</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSDictionary</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:137</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSSetCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:171</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSSet</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:177</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSNumber</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:187</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSArrayCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:188</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSDictionaryCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Shad<wbr>owProtocols.swift:189</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSSetCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/core/Stri<wbr>ngBridge.swift:194</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_NSStringCore</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/SDK/Found<wbr>ation/NSError.swift:353</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ObjectiveCBridgeableError</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/SDK/Found<wbr>ation/NSError.swift:379</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
__BridgedNSError</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/SDK/Found<wbr>ation/NSError.swift:446</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_BridgedNSError</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:rgb(248,248,248);margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/SDK/Found<wbr>ation/NSError.swift:456</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_BridgedStoredNSError</code></td>
</tr>
<tr style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204,204,204);background-color:white;margin:0px;padding:0px">
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:left">
/swift/stdlib/public/SDK/Found<wbr>ation/NSError.swift:564</td>
<td style="border:1px solid rgb(204,204,204);margin:0px;padding:6px 13px;text-align:center">
<code 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:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">
_ErrorCodeProtocol</code></td>
</tr>
</tbody>
</table>
<div style="margin:15px 0px"><br class="m_2275515528959643236m_2643987633502928267webkit-block-placeholder">
</div>
</div>
<div class="m_2275515528959643236m_2643987633502928267bloop_original_html" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
<div id="m_2275515528959643236m_2643987633502928267bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;margin:0px">
<br></div>
<br>
<div id="m_2275515528959643236m_2643987633502928267bloop_sign_1487490659060471040" class="m_2275515528959643236m_2643987633502928267bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
--&nbsp;<br>
Adrian Zubarev<br>
Sent with Airmail</div>
</div>
<br>
<p class="m_2275515528959643236m_2643987633502928267airmail_on" style="margin:15px 0px">Am 19. Februar 2017 um 07:59:45, David
Waite via swift-evolution (<a href="mailto:swift-evolution@swift.org" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank">swift-evolution@swift.org</a>) schrieb:</p>
<blockquote type="cite" class="m_2275515528959643236m_2643987633502928267clean_bq" style="margin:15px 0px">
<div>
<div><span style="margin-top:0px;margin-bottom:0px">I am unsure if
this feature is a good idea. Does someone have a real-world use for
this which isn’t just hiding strong implementation coupling behind
a protocol?<br>
<br>
When I consume a protocol, it is under the assumption that the
protocol is documented such that I would be able to work against
*any* implementation of the protocol. With a closed protocol, I
would have to assume that there are significant side effects,
either undocumented or difficult for a third party to duplicate. To
my experience, that sounds brittle.<br>
<br>
Assuming you aren’t switching on the implementing type of a
protocol (which itself can be a sign that your design isn’t
properly using polymorphism), one could get this design by creating
a struct with the interface desired, and passing invocations
through to an internal protocol reference.<br>
<br>
-DW<br>
<br>
&gt; On Feb 18, 2017, at 1:41 PM, Matthew Johnson via
swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Now that we’re in phase 2 I’d like to officially propose we
introduce `open` protocols and require conformances to `public`
protocols be inside the declaring module. Let’s use this thread for
feedback on the official proposal. After a healthy round of
discussion I’ll open a PR to submit it for review.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; # Feature name<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; * Proposal: [SE-NNNN](NNNN-open-public-<a href="http://protocols.md" target="_blank">pro<wbr>tocols.md</a>)<br>
&gt; * Authors: [Matthew Johnson](<a href="https://github.com/anandabits" target="_blank">https://github.com/an<wbr>andabits</a>)<br>
&gt; * Review Manager: TBD<br>
&gt; * Status: **Awaiting review**<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Introduction<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; This proposal introduces `open protocol` and changes the
meaning of `public protocol` to match the meaning of `public class`
(in this case, conformances are only allowed inside the declaring
module).<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The pitch thread leading up to this proposal was: [consistent
public access modifiers](<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170206/031653.html" target="_blank">https://lists.swift<wbr>.org/pipermail/swift-evolution<wbr>/Week-of-Mon-20170206/031653.<wbr>html</a>)<br>

&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Motivation<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; A general principle the Swift community has adopted for access
control is that defaults should reserve maximum flexibility for a
library. The ensures that any capabilities beyond mere visibility
are not available unless the author of the library has explicitly
declared their intent that the capabilities be made available.
Finally, when it is possible to switch from one semantic to another
without breaking clients (but not vice-versa) we should prefer the
more forgiving (i.e. fixable) semantic as the (soft) default.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; `public` is considered a "soft default" in the sense that it
is the first access modifier a user will reach for when exposing a
declaration outside of the module. In the case of protocols the
current meaning of `public` does not meet the principle of
preserving maximum flexibility for the author of the library. It
allows users of the library to conform to the protocol.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; There are good reasons a library may not wish to allow users
to add conformances to a protocol. For example, it may not wish to
expose the conforming concrete types. While similar behavior could
be accomplished with an enum if cases could be private, that
requires an implementation to use switch statements rather than
polymorphism.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Even if all the conforming types are also public there are
cases where polymorphism is the preferred implementation. For
example, if the set of conforming types is not expected to be fixed
(despite all being inside the library) the authors may not want to
have to maintain switch statements every time they need to add or
remove a confroming type which would be necessary if an enum were
used instead. Polymorphism allows us to avoid this, giving us the
ability to add and remove conforming types within the
implementation of the library without the burden of maintaining
switch statements.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Aligning the access modifiers for protocols and classes allows
us to specify both conformable and non-conformable protocols,
provides a soft default that is consistent with the principle of
(soft) defaults reserving maximum flexibility for the library, and
increases the overall consistency of the language by aligning the
semantics of access control for protocols and classes.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The standard library currently has at least one protocol
(`MirrorPath`) that is documented as disallowing client
conformances. If this proposal is adopted it is likely that
`MirrorPath` would be declared `public protocol` and not `open
protocol`.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Jordan Rose has indicated that the Apple frameworks also
include a number of protocols documented with the intent that users
do not add conformances. Perhaps an importer annotation would allow
the compiler to enforce these semantics in Swift code as
well.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Proposed solution<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The proposed solution is to change the meaning of `public
protocol` to disallow conformances outside the declaring module and
introduce `open protocol` to allow conformances outside the
decalring module (equivalent to the current meaning of `public
protocol`).<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Detailed design<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The detailed design is relatively straightforward but there
are three important wrinkles to consider.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ### User refinement of public protocols<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Consider the following example:<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ```swift<br>
&gt; // Library module:<br>
&gt; public protocol P {}<br>
&gt; public class C: P {}<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; // User module:<br>
&gt; protocol User: P {}<br>
&gt; extension C: User {}<br>
&gt; ```<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The user module is allowed to add a refinement to `P` because
this does not have any impact on the impelementation of the library
or its possible evolution. It simply allows the user to write code
that is generic over a subset of the conforming types provided by
the library.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ### Public protocols with open conforming classes<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Consider the following example:<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ```swift<br>
&gt; public protocol P P{}<br>
&gt; open class C: P {}<br>
&gt; ```<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Users of this module will be able to add subclasses of `C`
that have a conformance to `P`. This is allowed becuase the client
of the module did not need to explicitly declare a conformance and
the module has explicitly stated its intent to allow subclasses of
`C` with the `open` access modifier.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ### Open protocols that refine public protocols<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; Consider the following example:<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ```swift<br>
&gt; // library module:<br>
&gt; public protocol P {}<br>
&gt; open protocol Q: P {}<br>
&gt; open protocol R: P {}<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; // user module:<br>
&gt; struct S: P {} // error `P` is not `open`<br>
&gt; struct T: Q {} // ok<br>
&gt; struct U: R {} // ok<br>
&gt; ```<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The user module is allowed to introudce a conformance to `P`,
but only indirectly by also conforming to `Q`. The meaning we have
ascribed to the keywords implies that this should be allowed and it
offers libraries a very wide design space from which to choose. The
library is able to have types that conform directly to `P`, while
placing additional requirements on user types if necessary.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Source compatibility<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; This proposal breaks source compatibility, but in a way that
allows for a simple mechanical migration. A multi-release stratgegy
will be used to roll out this proposal to provide maximum possible
source compatibility from one release to the next.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; 1. In Swift 4, introduce the `open` keyword and the `@nonopen`
attribute (which can be applied to `public protocol` to give it the
new semantics of `public`).<br>
&gt; 2. In Swift 4 (or 4.1 if necessary) start warning for `public
protocol` with no annotation.<br>
&gt; 3. In the subsequent release `public protocol` without
annotation becomes an error.<br>
&gt; 4. In the subsequent relase `public protocol` without
annotation takes on the new semantics.<br>
&gt; 5. `@nonopen` becomes a warning, and evenutally an erro as
soon as we are comfortable making those changes.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Effect on ABI stability<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; I would appreciate it if others can offer input regarding this
section. I believe this proposal has ABI consequences, but it's
possible that it could be an additivie ABI change where the ABI for
conformable protocols remains the same and we add ABI for
non-conformable protocols later. If that is possible, the primary
impact would be the ABI of any standard library protocols that
would prefer to be non-conformable.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Effect on API resilience<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; This proposal would may impact one or more protocols in the
standard library, such as `MirrorPath`, which would likely choose
to remain `public` rather than adopt `open`.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ## Alternatives considered<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; The primary alternatives are to either make no change, or to
add something like `closed protocol`. The issues motivating the
current proposal as a better alternative than either of these
options are covered in the motivation section.<br>
&gt;<span class="m_2275515528959643236m_2643987633502928267Apple-converted-space">&nbsp;</span><br>

&gt; ______________________________<wbr>_________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>

<br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color:rgb(65,131,196);background-color:inherit;text-decoration:none" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>
</span></div>
</div>
</blockquote>
</div>
<div class="m_2275515528959643236m_2643987633502928267bloop_markdown" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254)">
</div>
</div>
</blockquote>
</div>
<br></div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div>
<span>______________________________<wbr>_________________</span><br>

<span>swift-evolution mailing list</span><br>
<span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br>
<span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a></span><br>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>

<br></blockquote>
</div>
<br></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<div class="m_2275515528959643236bloop_markdown"></div>
</div>
</blockquote>
</div>
<br></div>
</div>


</div></div></span></blockquote></div><div class="bloop_markdown"><p></p></div></body></html>