Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-06 Thread Vladimir.S via swift-evolution
On 06.07.2016 0:07, Jordan Rose wrote: On Jul 3, 2016, at 5:02, Vladimir.S via swift-evolution > wrote: On 02.07.2016 4:20, Daniel Duan via swift-evolution wrote: Vladimir.S via swift-evolution writes:

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-05 Thread Duan via swift-evolution
I have a patch that implements this proposal *except* this part. (aka () -> Void means 0 argument therefore { _ in } is a mismatch). If we were to interpret tuple and the outer paren as described in this proposal, it should be consistent everywhere, therefore requires more consideration

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-05 Thread Jordan Rose via swift-evolution
> On Jul 3, 2016, at 5:02, Vladimir.S via swift-evolution > wrote: > > On 02.07.2016 4:20, Daniel Duan via swift-evolution wrote: >>> Vladimir.S via swift-evolution writes: >> >> Following your conclusion, should this be legal as well? >> >>

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-03 Thread Vladimir.S via swift-evolution
On 03.07.2016 23:04, Haravikk wrote: On 3 Jul 2016, at 20:03, Vladimir.S wrote: But, then, regarding the consistency and confusion, I have a question: is it expected that func f() {..} will *return* `Void` ? I believe it is not expected exactly at the same level as Void in

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-03 Thread Xiaodi Wu via swift-evolution
The issue of Void and () has definitely been brought up before. On Sun, Jul 3, 2016 at 15:04 Haravikk via swift-evolution < swift-evolution@swift.org> wrote: > > > On 3 Jul 2016, at 20:03, Vladimir.S wrote: > > > > But, then, regarding the consistency and confusion, I have a

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-03 Thread Haravikk via swift-evolution
> On 3 Jul 2016, at 20:03, Vladimir.S wrote: > > But, then, regarding the consistency and confusion, I have a question: is it > expected that func f() {..} will *return* `Void` ? I believe it is not > expected exactly at the same level as Void in parameter for 0 argument >

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-03 Thread Vladimir.S via swift-evolution
On 03.07.2016 19:48, Haravikk wrote: On 3 Jul 2016, at 13:02, Vladimir.S via swift-evolution wrote: On 02.07.2016 4:20, Daniel Duan via swift-evolution wrote: Vladimir.S via swift-evolution writes: Following your conclusion, should this be

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-03 Thread Haravikk via swift-evolution
> On 3 Jul 2016, at 13:02, Vladimir.S via swift-evolution > wrote: > > On 02.07.2016 4:20, Daniel Duan via swift-evolution wrote: >>> Vladimir.S via swift-evolution writes: >> >> Following your conclusion, should this be legal as well? >> >>

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-03 Thread Vladimir.S via swift-evolution
On 02.07.2016 4:20, Daniel Duan via swift-evolution wrote: Vladimir.S via swift-evolution writes: Following your conclusion, should this be legal as well? let f: () -> Void = { x in print(x) } // f() prints "()" let f: (Int) -> Void = { x in print(x) } // f(5) prints "5"

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-01 Thread Daniel Duan via swift-evolution
> Vladimir.S via swift-evolution writes: Following your conclusion, should this be legal as well? let f: () -> Void = { x in print(x) } // f() prints "()" let f: (Int) -> Void = { x in print(x) } // f(5) prints "5" In other words, "0 argument" is an impossible scenario?

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-01 Thread T.J. Usiyan via swift-evolution
+1 if SE-0111 is accepted. 0 otherwise. On Fri, Jul 1, 2016 at 7:34 PM, Vladimir.S via swift-evolution < swift-evolution@swift.org> wrote: > On 02.07.2016 1:49, Daniel Duan via swift-evolution wrote: > >> Chris Lattner via swift-evolution writes: >> >> I think there's an

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-01 Thread Vladimir.S via swift-evolution
On 02.07.2016 1:49, Daniel Duan via swift-evolution wrote: Chris Lattner via swift-evolution writes: I think there's an edge case that needs consideration: when there's zero expected arguments and the '_' parameter is used: let f: () -> Void = { _ in } As I understand

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-07-01 Thread Daniel Duan via swift-evolution
Chris Lattner via swift-evolution writes: I think there's an edge case that needs consideration: when there's zero expected arguments and the '_' parameter is used: let f: () -> Void = { _ in } According to the proposal, this is syntactically incorrect ( 0 != 1 ). But it

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Vladimir.S via swift-evolution
On 01.07.2016 0:17, Austin Zheng wrote: #1 was discussed in this thread: http://thread.gmane.org/gmane.comp.lang.swift.evolution/16190. According to Chris, "FWIW, Swift 1 supported tuple destructuring in parameter lists, and we took it out to simplify the language and eliminate special cases."

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Austin Zheng via swift-evolution
#1 was discussed in this thread: http://thread.gmane.org/gmane.comp.lang.swift.evolution/16190. According to Chris, "FWIW, Swift 1 supported tuple destructuring in parameter lists, and we took it out to simplify the language and eliminate special cases." #2 may or may not naturally fall out of

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Vladimir.S via swift-evolution
Just want to brought some things/questions that was not reflected in proposal and that I think should be mentioned: 1. Should we be able to have such syntax to de-couple tuple's values in parameter of closure: let a : ((Int, Int, Int)) -> Int = { ((x, y, z)) in return x + y + z } or only as

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Taras Zakharko via swift-evolution
> * What is your evaluation of the proposal? +1 > * Is the problem being addressed significant enough to warrant a change > to Swift? Yes > * Does this proposal fit well with the feel and direction of Swift? Yes > * If you have used other languages or libraries with

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Guillaume Lessard via swift-evolution
> * What is your evaluation of the proposal? Positive. I thought this was a bug, post SE-0029. > * Is the problem being addressed significant enough to warrant a change to > Swift? Yes. > * Does this proposal fit well with the feel and direction of Swift? Yes. > * If you have used other

Re: [swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Sean Heber via swift-evolution
> The review of "SE-0110: Distinguish between single-tuple and > multiple-argument function types" begins now and runs through July 4. The > proposal is available here: > > > https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md > > *

[swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types

2016-06-30 Thread Chris Lattner via swift-evolution
Hello Swift community, The review of "SE-0110: Distinguish between single-tuple and multiple-argument function types" begins now and runs through July 4. The proposal is available here: https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md