[swift-evolution] Partial list of open Swift 3 design topics

Charlie Monroe charlie at charliemonroe.net
Tue Jun 28 00:40:59 CDT 2016


Oh, I see. The issue is then the following:

let x = f
x(1, 2) // Error: Missing argument labels 'a:b:' in call

let y: (Int, Int) -> () = f
f(1, 2) // OK

Which requires you to write x(a: 1, b: 2). I must admit, however, that I always liked this behavior...

> On Jun 28, 2016, at 7:06 AM, Austin Zheng <austinzheng at gmail.com> wrote:
> 
> I think the point is to get rid of the argument labels. 'x' should be typed simply (Int, Int) -> ().
> 
> That being said, right now the argument labels in the type don't seem to actually affect anything, so like Chris I'm not sure what the counter-proposal is.
> 
> (cc. Doug)
> 
> Best,
> Austin
> 
>> On Jun 27, 2016, at 10:04 PM, Charlie Monroe <charlie at charliemonroe.net> wrote:
>> 
>>> This came from a short list of topics Doug provided me, but the basic issue is that:
>>> 
>>> func f(a : Int, b : Int) {
>>> let x = f   // x has type (a: Int, b: Int) -> ()
>>> }
>>> 
>>> I’m not exactly sure what the counterproposal is.
>> 
>> My guess is to require let x = f(a:,b:) (specifying arguments)?
>> 
>>> 
>>> -Chris
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
> 



More information about the swift-evolution mailing list