<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This is my first post on this list so please bear with me.<div class=""><br class=""></div><div class="">I very much like this proposal but what bothers me is this doubling of valueForKeyPath(#keyPath(xxx) in the signature of the function.</div><div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; padding: 16px; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; word-break: normal; color: rgb(51, 51, 51);" class="">chris<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>valueForKeyPath(#keyPath(Person<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>bestFriend<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>lastName)) <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">// =&gt; Groff</span>
chris<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>valueForKeyPath(#keyPath(Person<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>friends<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>firstName)) <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">// =&gt; ["Joe", "Douglas"]</span></pre><div class=""><br class=""></div></div><div class="">I’m not sure whether the form below is actually possible. For me it reads more naturally and is more consistent with “Modern Swift” as far as I know.</div><div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; padding: 16px; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; word-break: normal; color: rgb(51, 51, 51);" class="">chris<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>valueFor(#keyPath(Person<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>friends<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>firstName)) <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">// =&gt; ["Joe", "Douglas”]</span></pre><pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; padding: 16px; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; word-break: normal; color: rgb(51, 51, 51);" class=""><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">or maybe</span></pre><pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; padding: 16px; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; word-break: normal; color: rgb(51, 51, 51);" class=""><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">chris<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>valueOf(#keyPath(Person<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>friends<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>firstName)) // =&gt; ["Joe", "Douglas”]</span></pre></div><div class=""><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"><br class=""></span></div><div class=""><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">Just my observation.</span></div><div class=""><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">Regards</span></div></body></html>