[swift-evolution] [pitch] Eliminate the "T1 -> T2" syntax, require "(T1) -> T2"

Jeremy Pereira jeremy.j.pereira at googlemail.com
Wed Apr 20 06:31:18 CDT 2016

> On 20 Apr 2016, at 08:02, Vladimir.S via swift-evolution <swift-evolution at swift.org> wrote:
> Great points! We definitely have some mess with tuples&parameters list in current Swift. Especially after we removed tuple splat feature.
> But right now can't see what we can do about this.
> (T1,T2) -> (T3,T4) really reads as "tuple (T1,T2) to tuple (T3,T4)”

To me that reads as "function taking two parameters and returning a tuple”. 

Full disclosure: until this thread started, I did not know that T1 -> T2 was legal. However, except for function application, I have always though of parentheses as optional things that are there only to disambiguate syntax or override operator precedence. To me the consistent rule would be to allow T1 -> T2 not to ban it.

More information about the swift-evolution mailing list