[swift-evolution] Tuple

Anton Zhilin antonyzhilin at gmail.com
Thu Jul 21 04:41:37 CDT 2016


It's error by design: we don't allow tuple unpacking in closure parameters.
Another example:

func call(block: ((Int, Int)) -> Int)  // note double parens
call { (a, b) in print(a + b) }  // will be error
call { (a) in print(a.0 + a.1) } // ok

Sorry, did not send to evolution the first time.
We usually refer to SE-0029 "Remove implicit tuple splat", although it does
not specifically mention closures.
I would suggest to start discussion on your (additive) change after 07/30.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160721/e1cb00b7/attachment.html>


More information about the swift-evolution mailing list