<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><blockquote type="cite" class="">On 18 Dec 2015, at 03:27, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">Swift currently offers dot shorthand for static members of type Self in type contexts expecting a value of the type in question. &nbsp;This is&nbsp;most commonly used with enum cases.<br class=""><br class="">Swift does not currently offer shorthand for instance members. &nbsp;Introducing a shorthand for instance members would improve clarity&nbsp;and readability of code in common cases:<br class=""><br class="">anArray.map{$0.anInstanceMethod()}<br class=""><br class="">becomes:<br class=""><br class="">anArray.map(.anInstanceMethod())<br class=""><br class="">This shorthand would work in typing contexts expecting a single argument function. &nbsp;It would allow abbreviated access to any visible&nbsp;instance property getter or instance method on the type of the argument. &nbsp;Of course the return type would need to match the return&nbsp;type expected by the context or a type mismatch compiler error would occur.<br class=""><br class="">The readability advantage is arguably small but it does exist. &nbsp;The feature also aligns very well with an existing language feature.<br class=""><br class="">I think it’s an interesting idea and am wondering whether others feel like it is something worth pursuing or not.<br class=""><br class="">Matthew<br class=""></blockquote><br class=""><div class="">I’d be interested to hear peoples thoughts regarding this proposal. I’m personally in favour, but perhaps there are potential issues with the suggestion?</div><div class=""><br class=""></div><div class="">It’s only a small visual change, but I think it is a syntactic improvement. Let’s pretend for a moment that the current syntax was:</div><div class=""><b class="">anArray.map(.anInstanceMethod())</b></div><div class=""><br class=""></div><div class="">I’m not sure many people would argue for it to be changed to:</div><div class=""><b class="">anArray.map { $0.anInstanceMethod() }</b></div><div class=""><b class=""><br class=""></b></div><div class="">Al</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>