[swift-evolution] [Pitch] Small bit of sugar for enum case with Void associated value

David Sweeris davesweeris at mac.com
Tue Jul 25 17:29:58 CDT 2017


> On Jul 25, 2017, at 2:20 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> 
> Yes, I discussed this some time back. It breaks some things with overloads, if I recall, but off the top of my head not recalling what.

Functions that are overloaded with one version taking no arguments and another taking only some number of Void arguments would break, but I'm not sure how important that is. Nor am I sure that's all that would break. I'm mean, really we'd just be automatically adding functions that only have Void arguments to the call-site "func foo() {}" vs "func foo(x: SomeType = someValue) {}" issue.

Meh, maybe such implicit behavior should be reserved for "Never", if we ever get that.

- Dave Sweeris



More information about the swift-evolution mailing list