[swift-evolution] [Discussion] Removing tuple labels from the type signature

Maximilian Hünenberger m.huenenberger at me.com
Thu Feb 4 17:26:12 CST 2016


Is this behavior intended?

What disadvantage do I have if a conversion from (a: Int, b: Int) to (x: Int, y: Int) is allowed?


Thank you for clarification
- Maximilian

> Am 05.02.2016 um 00:11 schrieb Chris Lattner <clattner at apple.com>:
> 
> 
>> On Feb 4, 2016, at 10:57 AM, Maximilian Hünenberger <m.huenenberger at me.com> wrote:
>> 
>> Is there a reasoning behind treating (Int, Int) and (lhs: Int, rhs: Int) as separate types?
> 
> I’m not sure what you mean by “separate types”.  One has labels, one does not, so they are clearly separate.
> 
> Further, "(Int, Int)” needs to be compatible/convertible to "(a : Int, b : Int)”, but “(a : Int, b : Int)” should not be convertible to “(x : Int, y : Int)”.
> 
>> Is there a connection to your tuple splat proposal?
> 
> No connection at all.
> 
> -Chris
> 



More information about the swift-evolution mailing list