[swift-evolution] [Pitch] [Stage 2] [Additional] Remove leading dot after closures

Adrian Zubarev adrian.zubarev at devandartist.com
Sun Aug 28 13:15:07 CDT 2016


This is a small pitch for stage 2 (or even another Swift release, if the community likes this change).

We all love the trailing closure plus the ability to execute the next method with another trailing closure.

someArray.map { … }.filter { … }.flatMap { … }  
Wouldn’t be great if we could remove the leading . after the trailing closure to get similar syntax to if bool { … } else { … }?

someArray.map { … } filter { … } flatMap { … }  


-- 
Adrian Zubarev
Sent with Airmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160828/1f3fd7df/attachment.html>


More information about the swift-evolution mailing list