[swift-evolution] History and future of Swift's parentheses
stephen.celis at gmail.com
Fri Jun 9 14:56:46 CDT 2017
> On Jun 9, 2017, at 1:17 PM, Gor Gyolchanyan via swift-evolution <swift-evolution at swift.org> wrote:
> Yes, except why would you need to define `((A, B)) -> C`?, If you need to pass a 2-element tuple into a function that takes two parameters - you can! If you want to pass two values into a function that *looks* like it takes a single 2-element tuple - you can! Seems to me that the difference between `((A, B)) -> C` and `(A, B) -> C` is virtually non-existent. But keep in mind that this only works for bare tuples (the ones that can't have labels). Non-closure functions DO have labels, which is part of their signature, so this is a different story.
Exactly. Been trying to communicate this for awhile. The types are almost always completely isomorphic and so the distinction barely exists. Function-only modifiers (like inout) make things slightly more complicated but I don’t think is an insurmountable problem.
Really miss the expressiveness we lost :/
More information about the swift-evolution