[swift-evolution] [Review] SE-0121: Remove `Optional` Comparison Operators

Sean Heber sean at fifthace.com
Tue Jul 12 14:25:54 CDT 2016


> The review of "SE-0121: Remove `Optional` Comparison Operators" begins now and runs through July 19. The proposal is available here:
> 
> 	https://github.com/apple/swift-evolution/blob/master/proposals/0121-remove-optional-comparison-operators.md
> 
> 	* What is your evaluation of the proposal?

I think this probably makes sense. However IMO it is critical that this not be expanded to also include ==/!= as I rely on that working when testing against optionals all of the time - but thankfully that is not included in this proposal.


> 	* Is the problem being addressed significant enough to warrant a change to Swift?

I’ve never knowingly encountered this problem, so it’s hard to say without doing some more careful auditing.


> 	* Does this proposal fit well with the feel and direction of Swift?

I believe so - it encourages “safe by default” logic and in this case I can totally see how the current design could yield surprising results.


> 	* If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

I think the closest scenario I’m familiar with is Objective-C where if you call -compare: on a nil var, you’ll get back a 0 which is NSOrderedSame when you totally didn’t expect that! This proposal should avoid that sort of thing from flying under the radar in Swift.


> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Not a lot, tbh.

l8r
Sean



More information about the swift-evolution mailing list