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

Haravikk swift-evolution at haravikk.me
Mon Aug 29 10:13:14 CDT 2016


While I kind of like the idea of effectively rolling my own keywords, my personal preference is to remain explicit about the fact that this is a method of something.
I don't know if I'm against the idea, I just don't think I'd use it.

> On 28 Aug 2016, at 19:15, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 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
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160829/7e438f5e/attachment.html>


More information about the swift-evolution mailing list