[swift-evolution] Argument labels in callbacks
Franklin Schrans
f.schrans at me.com
Wed Feb 22 02:36:49 CST 2017
Hi,
When SE-0111 <https://github.com/apple/swift-evolution/blob/master/proposals/0111-remove-arg-label-type-significance.md> was approved, I noticed the implication it had when using closures as callbacks:
Writing
func foo(completion: (success: Bool) -> Void) {
completion(success: true)
}
is no longer possible, because function types can’t have argument labels anymore, and the function has to be written:
func foo(completion: (Bool) -> Void) {
completion(true)
}
which doesn’t look very nice, especially as the number of the arguments increases.
After talking to Chris Lattner about this, he referred me to this <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160711/024331.html> email.
I was wondering if there's been any further work or plans in restoring the use of argument labels in closures.
- Franklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170222/db9df1e0/attachment.html>
More information about the swift-evolution
mailing list