Adrian: I would prefer to not have it at all. But this is a better alternative than a brand new line declaring a return, and nothing else. This is inline and part of the ‘guard’ declaration (better context), and definitely better than having a warning stay in your codebase.
Putting the code clarity aside, having a compiler error for a non-returned guard seems like an overkill, and different that the other Swift implementations (such as Switch that doesn’t need a break to not fall through). Xiaodi: Thank you for the links. Was an actual proposal ever formed for this, or was it decided not to move forward? Yarden On June 20, 2016 at 1:33:54 AM, Adrian Zubarev via swift-evolution ( [email protected]) wrote: @implicitreturn guard a = b else { print(“foo”) } Isn’t that just the same? I mean now you even write more boilerplate then bebore. How does your return type look, what are you trying to solve? -- Adrian Zubarev Sent with Airmail Am 20. Juni 2016 um 08:30:39, Yarden Eitan via swift-evolution ( [email protected]) schrieb: @implicitreturn guard a = b else { print(“foo”) } _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
