<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPad</div><div><br>On Mar 21, 2017, at 7:27 AM, Jean-Daniel &lt;<a href="mailto:mailing@xenonium.com">mailing@xenonium.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">Le 20 mars 2017 à 15:52, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">On Mar 20, 2017, at 9:23 AM, Christopher Kornher via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On Mar 20, 2017, at 5:12 AM, David Hart via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On 20 Mar 2017, at 10:39, Jonathan Hull via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">+1. &nbsp;This is my favorite solution so far.<span class="Apple-converted-space">&nbsp;</span><br class=""><br class="">With ‘Person.keypath.name' it is obvious that we are creating a key path. &nbsp;There is no ambiguity for the reader. &nbsp;With autocomplete it will be very little extra typing anyway…<br class=""></blockquote><br class="">But that adds a lot of verbosity. They disregarded #keyPath because it was too verbose.<br class=""></blockquote><br class="">The syntax in the original proposal is terse and elegant, and will probably be fine when a developer who is experienced with Swift and a particular codebase is first writing the code. Using “key path” or “keypaths” of perhaps a shorter term or even a single leading character (`#` ?) will make this feature more discoverable, tool-friendly and its usages more maintainable.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">It also makes it inconsistent with how unbound methods behave. &nbsp;I have yet to hear a convincing argument about why key paths should be treated different syntactically.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>Because they are two different beasts. Are you arguing that we should allow unbound method as subscript parameter to be consistent with key path ?</div></div></blockquote><div><br></div><div>Obviously not. &nbsp;A keypath represents data so a subscript is the logical way to access the data. &nbsp;An unbound method represents a function so you call it. &nbsp;But both represent unbound ways to access members of instances of a type, store that access in a variable, pass it as an argument, etc. &nbsp;</div><div><br></div><div>I think the language is best served if all unbound members are accessible using the same syntax. &nbsp;<span style="background-color: rgba(255, 255, 255, 0);">IMO this proposal does the right thing by choosing consistency with existing language features. &nbsp;The current syntax for unbound methods works and hasn't caused any confusions I'm aware of in practice. &nbsp;</span></div><div><br></div><div>I don't feel too strongly about what syntax we use as long as it's concise and works for accessing all unbound members. &nbsp;If people want to make the case for using `#` instead of `.` to do this I won't object but I won't be a vocal advocate either. &nbsp;However, I think that should be an independent proposal if somebody wants to pursue it rather than a bike shed on this proposal which would only lead to inconsistency between key paths and unbound methods if it succeeds.</div><br><blockquote type="cite"><div><div><br class=""></div></div></blockquote></body></html>