Regardless the issue you described with rethrows couldn’t we simply explicitly 
tell the compiler the closures type which would include the pure arrow?

let _: (T) ~> SomeType = { … }

That is similar to the behavior we now have with IUOs. (let myView: UIView = 
self.view inside UIViewController on iOS)

I don’t know if the tilde is heavily used in any other programming patterns and 
might create confusion here, but from the aesthetic point of view I’d prefer ~> 
over =>.



-- 
Adrian Zubarev
Sent with Airmail

Am 17. Februar 2017 um 15:37:15, Matthew Johnson via swift-evolution 
(swift-evolution@swift.org) schrieb:

Also, what about pure closures that have no need to state a signature because 
it is inferred?  This syntactic sugar is a pretty important aspect of Swift and 
often times some of our smallest closures will be pure.  For example Array’s 
map should be pure when the closure is pure and many map closures are very 
small.  We don’t want to have to annotate these closures with a signature.  
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to