[swift-evolution] [Idea] Use optionals for non-optional parameters

Tino Heth 2th at gmx.de
Mon Aug 15 04:25:48 CDT 2016

> Am 15.08.2016 um 09:02 schrieb Justin Jia via swift-evolution <swift-evolution at swift.org>:
> foo.bar(x: x?)
Yes, those guards and ifs can be tedious, but it is clear what they are doing, and there is no doubt what code will be evaluated and what will be skipped.
If Swift had syntactic sugar that acts like optional chaining for parameters, I don't think that I would use it, because by moving the question mark far to the right, it can easily hide that something is conditional.

More information about the swift-evolution mailing list