[swift-evolution] [Review] SE-0110: Distinguish between single-tuple and multiple-argument function types
Xiaodi Wu
xiaodi.wu at gmail.com
Sun Jul 3 15:30:35 CDT 2016
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 at swift.org> 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?
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160703/7a8c8175/attachment.html>
More information about the swift-evolution
mailing list