<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:Arial;">I might point out that this form of bikeshedding was already explicitly called out in the text of the proposal. ("Alternatives Considered") Your personal preferences as to what sigils are "lightweight" or "easy" are not absolute ones without some form of evidence or objective rationale provided.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Until that can be done, it would be more productive to discuss what we can do to avoid ambiguity without magic sigils; or, in the face of Joe Groff's post, why that ambiguity is a problem at all.<br></div>
<div style="font-family:Arial;"><br></div>
<div id="sig40804545"><div class="signature"><span class="font" style="font-family:arial, sans-serif, sans-serif">Best,</span><span class="font" style="font-family:arial, sans-serif, sans-serif"></span><br></div>
<div class="signature"><span class="font" style="font-family:arial, sans-serif, sans-serif">&nbsp; Zachary Waldowski</span><span class="font" style="font-family:arial, sans-serif, sans-serif"></span><br></div>
<div class="signature"><span class="font" style="font-family:arial, sans-serif, sans-serif">&nbsp;&nbsp;</span><a href="mailto:zach@waldowski.me"><span class="font" style="font-family:arial, sans-serif, sans-serif">zach@waldowski.me</span></a><br></div>
</div>
<div><br></div>
<div><br></div>
<div>On Sun, Mar 19, 2017, at 01:00 AM, Muse M via swift-evolution wrote:<br></div>
<blockquote type="cite"><div>I would suggest a keypath using ~ which is concise and clearer to identify.<br></div>
<div><br></div>
<div><span class="colour" style="color:rgb(34, 34, 34)"><span class="size" style="font-size:14px"></span></span><span class="colour" style="color:rgb(34, 34, 34)"><span class="size" style="font-size:14px">let myPath = Person~friends[0].name</span></span><br></div>
<div><span class="colour" style="color:rgb(34, 34, 34)"><span class="size" style="font-size:14px"></span></span><br></div>
<div><span class="colour" style="color:rgb(34, 34, 34)"><span class="size" style="font-size:14px"></span></span><br></div>
<div><br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">On Sunday, March 19, 2017, Jonathan Hull via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div style="word-wrap:break-word;"><div style="font-family:Arial;">This looks fantastic!<br></div>
<div><br></div>
<div>The one worry I would have, as others have brought up, is confusion when there are static properties with the same name.&nbsp; Maybe we could have a special static property called ‘keyPath’ or ‘path’ that would be reserved, and anything that followed would be a key path.<br></div>
<div><br></div>
<div>So instead of:<br></div>
<div><br></div>
<div><span style="white-space:pre-wrap;"></span>let myPath =&nbsp;Person.friends[0].name<br></div>
<div><br></div>
<div>you would have:<br></div>
<div><br></div>
<div><span style="white-space:pre-wrap;"></span>let myPath = Person.keyPath.friends[0].name<br></div>
<div><br></div>
<div><br></div>
<div>Or if we want to choose a sentinel, I would nominate ‘$’:<br></div>
<div><br></div>
<div><span style="white-space:pre-wrap;"></span>let myPath = $Person.friends[0].name<br></div>
<div><br></div>
<div>Thanks,<br></div>
<div>Jon<br></div>
<div><br></div>
<div><div style="font-family:Arial;"><br></div>
<div><blockquote type="cite"><div>On Mar 17, 2017, at 10:04 AM, Michael LeHew via swift-evolution &lt;<a>swift-evolution@swift.org</a>&gt; wrote:<br></div>
<div style="font-family:Arial;"><br></div>
<div><div style="word-wrap:break-word;"><div style="word-wrap:break-word;"><div style="font-family:Arial;">Hi friendly swift-evolution folks,<br></div>
<div><br></div>
<div>The Foundation and Swift team &nbsp;would like for you to consider the following proposal:<br></div>
<div><br></div>
<div>Many thanks,<br></div>
<div>-Michael<br></div>
<div><br></div>
<div><h1 style="margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:28px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Smart KeyPaths: Better Key-Value Coding for Swift<br></h1><ul style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-left:30px;font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Proposal: SE-NNNN<br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Authors:&nbsp;<a href="https://github.com/Catfish-Man" style="color:rgb(65, 131, 196);margin-top:0px;">David Smith</a>,&nbsp;<a href="https://github.com/mlehew" style="color:rgb(65, 131, 196);">Michael LeHew</a>,&nbsp;<a href="https://github.com/jckarter" style="color:rgb(65, 131, 196);">Joe Groff</a><br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Review Manager: TBD<br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Status:&nbsp;<b>Awaiting Review</b><br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><div style="font-family:Arial;">Associated PRs:<br></div>
<ul style="margin-top:0px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-left:30px;"><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><a href="https://github.com/apple/swift-evolution/pull/644" style="color:rgb(65, 131, 196);margin-top:0px;">#644</a><br></li></ul></li></ul><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Introduction<br></h2><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">We propose a family of concrete&nbsp;<i>Key Path</i>&nbsp;types that represent uninvoked references to properties that can be composed to form paths through many values and directly get/set their underlying values.</span></span></span><br></p><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Motivation<br></h2><h4 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:16px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">We Can Do Better than String<br></h4><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">On Darwin platforms Swift's existing&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">#keyPath()</code>&nbsp;syntax provides a convenient way to safely&nbsp;<i>refer</i>&nbsp;to properties. Unfortunately, once validated, the expression becomes a&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">String</code>&nbsp;which has a number of important limitations:</span></span></span><br></p><ul style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-left:30px;font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Loss of type information (requiring awkward&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">Any</code>&nbsp;APIs)<br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Unnecessarily slow to parse<br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Only applicable to&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">NSObjects</code><br></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">Limited to Darwin platforms<br></li></ul><h4 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:16px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Use/Mention Distinctions<br></h4><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">While methods can be referred to without invoking them (<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">let x = foo.bar</code>&nbsp;instead of&nbsp;&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">let x = foo.bar()</code>), this is not currently possible for properties and subscripts.</span></span></span><br></p><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">Making indirect references to a properties' concrete types also lets us expose metadata about the property, and in the future additional behaviors.</span></span></span><br></p><h4 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:16px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">More Expressive KeyPaths<br></h4><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">We would also like to support being able to use&nbsp;<i>Key Paths</i>&nbsp;to access into collections, which is not currently possible.</span></span></span><br></p><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Proposed solution<br></h2><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">We propose introducing a new expression akin to&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">Type.method</code>, but for properties and subscripts. These property reference expressions produce&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPath</code>&nbsp;objects, rather than&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">Strings</code>.&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPaths</code>&nbsp;are a family of generic classes&nbsp;<i>(structs and protocols here would be ideal, but requires generalized existentials)</i>&nbsp;which encapsulate a property reference or chain of property references, including the type, mutability, property name(s), and ability to set/get values.</span></span></span><br></p><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">Here's a sample of it in use:</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;"><span class="colour" style="color:rgb(0, 119, 170)">struct</span> <span class="colour" style="color:rgb(102, 153, 0)">Person</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:rgb(0, 119, 170)">var</span> name<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">String</span>
    <span class="colour" style="color:rgb(0, 119, 170)">var</span> friends<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(102, 153, 0)">Person</span><span class="colour" style="color:rgb(153, 153, 153)">]</span>
    <span class="colour" style="color:rgb(0, 119, 170)">var</span> bestFriend<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">Person</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span>

<span class="colour" style="color:rgb(0, 119, 170)">var</span> han <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> <span class="colour" style="color:rgb(221, 74, 104)">Person</span><span class="colour" style="color:rgb(153, 153, 153)">(</span>name<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">"Han Solo"</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> friends<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(153, 153, 153)">]</span><span class="colour" style="color:rgb(153, 153, 153)">)</span>
<span class="colour" style="color:rgb(0, 119, 170)">var</span> luke <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> <span class="colour" style="color:rgb(221, 74, 104)">Person</span><span class="colour" style="color:rgb(153, 153, 153)">(</span>name<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">"Luke Skywalker"</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> friends<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(153, 153, 153)">[</span>han<span class="colour" style="color:rgb(153, 153, 153)">]</span><span class="colour" style="color:rgb(153, 153, 153)">)</span>

<span class="colour" style="color:rgb(0, 119, 170)">let</span> firstFriendsNameKeyPath <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> <span class="colour" style="color:rgb(102, 153, 0)">Person</span><span class="colour" style="color:rgb(153, 153, 153)">.</span>friends<span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(153, 0, 85)">0</span><span class="colour" style="color:rgb(153, 153, 153)">]</span><span class="colour" style="color:rgb(153, 153, 153)">.</span>name

<span class="colour" style="color:rgb(0, 119, 170)">let</span> firstFriend <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> luke<span class="colour" style="color:rgb(153, 153, 153)">[</span>path<span class="colour" style="color:rgb(153, 153, 153)">]</span> <span class="colour" style="color:slategray">// han</span>

<span class="colour" style="color:slategray">// or equivalently, with type inferred from context</span>
<span class="colour" style="color:rgb(0, 119, 170)">let</span> firstFriendName <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> luke<span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(153, 153, 153)">.</span>friends<span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(153, 0, 85)">0</span><span class="colour" style="color:rgb(153, 153, 153)">]</span><span class="colour" style="color:rgb(153, 153, 153)">.</span>name<span class="colour" style="color:rgb(153, 153, 153)">]</span>

<span class="colour" style="color:slategray">// rename Luke's first friend</span>
luke<span class="colour" style="color:rgb(153, 153, 153)">[</span>firstFriendsNameKeyPath<span class="colour" style="color:rgb(153, 153, 153)">]</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> <span class="colour" style="color:rgb(102, 153, 0)">"A Disreputable Smuggler"</span>

<span class="colour" style="color:rgb(0, 119, 170)">let</span> bestFriendsName <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">=</span></span> luke<span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(153, 153, 153)">.</span>bestFriend<span class="colour" style="color:rgb(153, 153, 153)">]</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span><span class="colour" style="color:rgb(153, 153, 153)">.</span>name  <span class="colour" style="color:slategray">// nil, if he is the last jedi</span></code><br></pre></div>
<h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Detailed design<br></h2><h3 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:18px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Core KeyPath Types<br></h3><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px"><code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPaths</code>&nbsp;are a hierarchy of progressively more specific classes, based on whether we have prior knowledge of the path through the object graph we wish to traverse.&nbsp;</span></span></span><br></p><h5 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:14px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Unknown Path / Unknown Root Type<br></h5><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px"><code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">AnyKeyPath</code>&nbsp;is fully type-erased, referring to 'any route' through an object/value graph for 'any root'. Because of type-erasure many operations can fail at runtime and are thus nillable.&nbsp;</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;"><span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>AnyKeyPath</span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">CustomDebugStringConvertible</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Hashable</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:slategray">// MARK - Composition</span>
    <span class="colour" style="color:slategray">// Returns nil if path.rootType != self.valueType</span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> <span class="colour" style="color:rgb(221, 74, 104)">appending</span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span>
    
    <span class="colour" style="color:slategray">// MARK - Runtime Information        </span>
    <span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>var</span> rootType<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">Any</span><span class="colour" style="color:rgb(153, 153, 153)">.</span><span class="colour" style="color:rgb(0, 119, 170)">Type</span>
    <span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>var</span> valueType<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">Any</span><span class="colour" style="color:rgb(153, 153, 153)">.</span><span class="colour" style="color:rgb(0, 119, 170)">Type</span>
    
    <span class="colour" style="color:rgb(0, 119, 170)">static</span> <span class="colour" style="color:rgb(0, 119, 170)">func</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">==</span></span> <span class="colour" style="color:rgb(153, 153, 153)">(</span>lhs<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> rhs<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">Bool</span>
    <span class="colour" style="color:rgb(0, 119, 170)">var</span> hashValue<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">Int</span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span></code><br></pre></div>
<h5 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:14px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Unknown Path / Known Root Type<br></h5><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">If we know a little more type information (what kind of thing the key path is relative to), then we can use&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">PartialKeyPath &lt;Root&gt;</code>, which refers to an 'any route' from a known root:</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;"><span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>PartialKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:slategray">// MARK - Composition</span>
    <span class="colour" style="color:slategray">// Returns nil if Value != self.valueType</span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> <span class="colour" style="color:rgb(221, 74, 104)">appending</span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">PartialKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">ReferenceKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">ReferenceKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span></code><br></pre></div>
<h5 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:14px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Known Path / Known Root Type<br></h5><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">When we know both what the path is relative to and what it refers to, we can use&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPath</code>. Thanks to the knowledge of the Root and Value types, all of the failable operations lose their Optional.&nbsp;</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;"><span class="colour" style="color:rgb(0, 119, 170)">public</span> <span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">PartialKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:slategray">// MARK - Composition</span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(0, 119, 170)">Self</span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">ReferenceWritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)"><wbr>,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">ReferenceWritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span></code><br></pre></div>
<h5 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:14px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Value/Reference Mutation Semantics Mutation<br></h5><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">Finally, we have a pair of subclasses encapsulating value/reference mutation semantics. These have to be distinct because mutating a copy of a value is not very useful, so we need to mutate an inout value.</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;"><span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:slategray">// MARK - Composition</span>
    <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">AppendedPathValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>p<wbr>ath<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedPathValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedPathValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span>

<span class="colour" style="color:rgb(0, 119, 170)">class</span> <span>ReferenceWritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:rgb(0, 119, 170)">override</span> <span class="colour" style="color:rgb(0, 119, 170)">func</span> appending<span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">AppendedPathValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>p<wbr>ath<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedPathValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">ReferenceWritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">AppendedPathValue</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span></code><br></pre></div>
<h3 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:18px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Access and Mutation Through KeyPaths<br></h3><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">To get or set values for a given root and key path we effectively add the following subscripts to all Swift types.&nbsp;</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;"><span class="colour" style="color:rgb(0, 119, 170)">extension</span> <span class="colour" style="color:rgb(102, 153, 0)">Any</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span>
    <span class="colour" style="color:rgb(0, 119, 170)">subscript</span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">AnyKeyPath</span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">Any</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">?</span></span> <span class="colour" style="color:rgb(153, 153, 153)">{</span> <span class="colour" style="color:rgb(0, 119, 170)">get</span> <span class="colour" style="color:rgb(153, 153, 153)">}</span>
    <span class="colour" style="color:rgb(0, 119, 170)">subscript</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(0, 119, 170)">Self</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">PartialKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">Any</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span> <span class="colour" style="color:rgb(0, 119, 170)">get</span> <span class="colour" style="color:rgb(153, 153, 153)">}</span>
    <span class="colour" style="color:rgb(0, 119, 170)">subscript</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(0, 119, 170)">Self</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">KeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span> <span class="colour" style="color:rgb(0, 119, 170)">get</span> <span class="colour" style="color:rgb(153, 153, 153)">}</span>
    <span class="colour" style="color:rgb(0, 119, 170)">subscript</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(0, 119, 170)">Self</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">(</span>path<span class="colour" style="color:rgb(153, 153, 153)">:</span> <span class="colour" style="color:rgb(102, 153, 0)">WritableKeyPath</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&lt;</span></span><span class="colour" style="color:rgb(102, 153, 0)">Root</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span><span class="colour" style="color:rgb(153, 153, 153)">)</span> <span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">-</span></span><span class="highlight" style="background-color:rgba(255, 255, 255, 0.498039)"><span class="colour" style="color:rgb(166, 127, 89)">&gt;</span></span> <span class="colour" style="color:rgb(102, 153, 0)">Value</span> <span class="colour" style="color:rgb(153, 153, 153)">{</span> <span class="colour" style="color:rgb(0, 119, 170)">set</span><span class="colour" style="color:rgb(153, 153, 153)">,</span> <span class="colour" style="color:rgb(0, 119, 170)">get</span> <span class="colour" style="color:rgb(153, 153, 153)">}</span>
<span class="colour" style="color:rgb(153, 153, 153)">}</span></code><br></pre></div>
<p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">This allows for code like</span></span></span><br></p><div style="font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><div><div style="background-color:rgb(207, 207, 207);display:inline-block;width:auto;height:auto;font-size:0.9em;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:5px;padding-top:0px;padding-right:0.5em;padding-bottom:0px;padding-left:0.5em;">Swift<br></div>
</div>
<pre style="margin-top:0.5em;margin-bottom:0.5em;background-color:rgb(245, 242, 240);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-x:auto;overflow-y:auto;padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-image:none;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;">person<span class="colour" style="color:rgb(153, 153, 153)">[</span><span class="colour" style="color:rgb(153, 153, 153)">.</span>name<span class="colour" style="color:rgb(153, 153, 153)">]</span> <span class="colour" style="color:slategray">// Self.type is inferred</span></code><br></pre></div>
<p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">which is both appealingly readable, and doesn't require read-modify-write copies (subscripts access&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">self</code>&nbsp;inout). Conflicts with existing subscripts are avoided by using generic subscripts to specifically only accept key paths with a&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">Root</code>&nbsp;of the type in question.</span></span></span><br></p><h3 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:18px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Referencing Key Paths<br></h3><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">Forming a&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPath</code>&nbsp;borrows from the same syntax used to reference methods and initializers,<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">Type.<wbr>instanceMethod</code>&nbsp;only now working for properties and collections. Optionals are handled via optional-chaining. Multiply dotted expressions are allowed as well, and work just as if they were composed via the&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">appending</code>&nbsp;methods on&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPath</code>.</span></span></span><br></p><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">There is no change or interaction with the #keyPath() syntax introduced in Swift 3.&nbsp;</span></span></span><br></p><h3 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:18px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Performance<br></h3><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">The performance of interacting with a property via&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;">KeyPaths</code>&nbsp;should be close to the cost of calling the property directly.</span></span></span><br></p><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Source compatibility<br></h2><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">This change is additive and there should no affect on existing source.&nbsp;</span></span></span><br></p><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Effect on ABI stability<br></h2><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">This feature adds the following requirements to ABI stability:&nbsp;</span></span></span><br></p><ul style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-left:30px;font-family:Helvetica, arial, sans-serif;font-size:14px;background-color:rgb(255, 255, 255);"><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;">mechanism to access key paths of public properties<br></li></ul><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">We think a protocol-based design would be preferable once the language has sufficient support for generalized existentials to make that ergonomic. By keeping the class hierarchy closed and the concrete implementations private to the implementation it should be tractable to provide compatibility with an open protocol-based design in the future.</span></span></span><br></p><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Effect on API resilience<br></h2><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">This should not significantly impact API resilience, as it merely provides a new mechanism for operating on existing APIs.</span></span></span><br></p><h2 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">Alternatives considered<br></h2><h4 style="margin-top:20px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:16px;font-family:Helvetica, arial, sans-serif;background-color:rgb(255, 255, 255);">More Features<br></h4><p style="margin: 15px 0px;"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="font" style="font-family:Helvetica, arial, sans-serif"><span class="size" style="font-size:14px">Various drafts of this proposal have included additional features (decomposable key paths, prefix comparisons, support for custom&nbsp;<code style="margin-top:0px;margin-right:2px;margin-bottom:0px;margin-left:2px;padding-top:0px;padding-right:5px;padding-bottom:0px;padding-left:5px;white-space:pre-wrap;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(234, 234, 234);border-right-color:rgb(234, 234, 234);border-bottom-color:rgb(234, 234, 234);border-left-color:rgb(234, 234, 234);border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background-color:rgb(248, 248, 248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;"></code></span></span></span><br></p></div>
</div>
</div>
</div>
</blockquote></div>
</div>
</div>
</blockquote><div><u>_______________________________________________</u><br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br></div>
<div><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
</blockquote><div style="font-family:Arial;"><br></div>
</body>
</html>