[swift-evolution] [Idea] Use optionals for non-optional parameters
2th at gmx.de
Wed Aug 17 10:59:20 CDT 2016
> Let’s discuss something else. Actually there is an easy fix: make all functions accept optionals. I think this is a really bad idea
I don't think there is a good motivation to change the status quo:
You can't "sugar away" everything; sometimes, you just have to write a line of code that does what you want.
As you can "if let" convert as many optionals as you like in a single statement, it really doesn't hurt that much.
The precondition stuff looks exactly like guard inside the function to me… what's the benefit of that?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution