Overall, -1.

I agree that labels should not affect the type, but imho the current status 
(Swift 2.3 — I haven't checked Version 3) is fine, and the proposal doesn't 
achieve what it says in the title:
For me, that is no question of types at all, but only of names:

var a: (Int, z: Int) -> Void = t
var b: (y: Int, z: Int) -> Void = t

a = b

This works, because a and b are both of type (Int, Int) -> Void, and the labels 
aren't significant.

So the proposal merely disallows labels in the declaration of function 
variables, which I consider bad, because labels convey the meaning of 
parameters. Why should something that is widely seen as a good feature of 
functions be removed from function variables?

If you share the opinion that labels are part of the name, the battleship 
example no good argument against labels:
No one stops you from doing

let minimum: (Int, Int) -> Int = max
Which is confusing as well.

Best regards,
Tino
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to