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

Vladimir.S svabox at gmail.com
Sun Jul 3 16:06:01 CDT 2016


On 03.07.2016 23:04, Haravikk wrote:
>
>> On 3 Jul 2016, at 20:03, Vladimir.S <svabox at gmail.com> 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 function. I.e. should `-> ()` still means "returns Void" or
>> "returns nothing" ?
>
> Fair question, personally I never use () to indicate void on the return
> side, and always specify the return type, so there's never any doubt
> what I meant, but that's just convention at the moment. I wouldn't mind
> seeing one style of void return being forced for consistency, but that's
> probably out of scope for this issue. It seems vaguely familiar though,
> has an issue already come up about removing the redundancy?
>

As stated in another thread, there will be no changes regarding meaning of 
`func f(){}` and `->()` - the same implicit(or explicit, as one wish) Void 
result.


More information about the swift-evolution mailing list