<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 16, 2015, at 8:18 AM, Stephen Celis via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></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=""> 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></div></div></div></blockquote><br class=""></div><div>This last alternative looks a lot like a special (single expression) case of the Method Cascading proposal <<a href="https://bugs.swift.org/browse/SR-160" class="">https://bugs.swift.org/browse/SR-160</a>>. If you want to go forward with this shorthand, I’d suggest adding it to method cascading as a rule: Invoking a closure with a single anonymous argument also implicitly begins a cascade with $0 as the default receiver.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Greg</div></body></html>