<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=""><div class="">This wouldn’t be ambiguous with static methods. &nbsp;Confusing to some developers possibly, but not ambiguous. &nbsp;Map would be expecting a function that takes an instance. &nbsp;Depending on the details of how it was defined in the language it could be ambiguous with a static property of a function type:</div><div class=""><br class=""></div><div class="">Car {</div><div class="">&nbsp; static let make: Car -&gt; SomeOtherType</div><div class="">}</div><div class=""><br class=""></div><div class="">This potential ambiguity could probably be defined away by making the shorthand specifically apply to instance methods or something like that.</div><div class=""><br class=""></div><div class="">There would not be an entirely new meaning for the . shorthand. &nbsp;It would be an extrapolation of the shorthand for enum cases.</div><div class=""><br class=""></div><div class="">That said, I was replying quickly and my example was not quite accurate. &nbsp;“make" is a getter which cannot be accessed in unbound form today. &nbsp;There are proposals to allow this to be done in other threads. &nbsp;Syntax from one example is Car.make#get (lets not get caught up on syntax of that here). &nbsp;So correcting my example it would look like:</div><div class=""><br class=""></div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="" style="word-wrap: break-word;"><div class=""><div class="" style="word-wrap: break-word;"><div class=""><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);">cars</span><span class="" style="font-family: Menlo; font-size: 11px;">.</span><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(61, 29, 129);">map</span><span class="" style="font-family: Menlo; font-size: 11px;">(.</span><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);">make#get)</span></div></div></div></div></div></div></div></div><div class=""><br class=""></div><div class="">If make was a method we would need to bind all of the arguments except the curried instance argument so it would look like this:</div><div class=""><br class=""></div><div class=""><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);">cars</span><span class="" style="font-family: Menlo; font-size: 11px;">.</span><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(61, 29, 129);">map</span><span class="" style="font-family: Menlo; font-size: 11px;">(.</span><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);">make())</span></div><div class=""><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);"><br class=""></span></div><div class=""><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);"><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class="">And a method with more arguments would look like this:</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class=""><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);">cars</span><span class="" style="font-family: Menlo; font-size: 11px;">.</span><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(61, 29, 129);">map</span><span class="" style="font-family: Menlo; font-size: 11px;">(.</span><span class="" style="font-family: Menlo; font-size: 11px; color: rgb(79, 129, 135);">methodWithInt(1, string: “hello"))</span></div></span></div><div class=""><br class=""></div><div class="">I’m not necessarily advocating for something like this, just trying to think through the implications of it at this point.</div><div class=""><br class=""></div><div class="">Matthew</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 16, 2015, at 10:18 AM, Stephen Celis &lt;<a href="mailto:stephen.celis@gmail.com" class="">stephen.celis@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On Wed, Dec 16, 2015 at 10:50 AM, Matthew Johnson via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">If we peel off just the contextual shorthand aspect of this proposal you could write:</div><div class=""><br class=""></div><div class=""><div style="word-wrap:break-word" class=""><div class=""><span style="font-family:Menlo;font-size:11px;color:rgb(79,129,135)" class="">cars</span><span style="font-family:Menlo;font-size:11px" class="">.</span><span style="font-family:Menlo;font-size:11px;color:rgb(61,29,129)" class="">map</span><span style="font-family:Menlo;font-size:11px" class="">(.</span><span style="font-family:Menlo;font-size:11px;color:rgb(79,129,135)" class="">make)</span></div><div class=""><br class=""></div></div></div><div class="">That does seem like a big win if it is feasible (doesn’t introduce ambiguity or cause other significant challenges in implementation).</div></div></blockquote><div class=""><br class=""></div><div class="">The above creates ambiguity if there were a `map` function that takes a type with a static member `make`.</div><div class=""><br class=""></div><div class="">Alternatively:</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; cars.map{.make}</div><div class=""><br class=""></div><div class="">Both create an additional meaning for dot abbreviation, though, which is confusing. I think I'm "-1" on this proposal as is. The existing form is clearer and relatively short as is.<br class=""></div><div class=""><br class=""></div><div class="">Stephen</div></div></div></div>
</div></blockquote></div><br class=""></body></html>