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

Goffredo Marocchi panajev at gmail.com
Tue Aug 30 01:43:36 CDT 2016



Sent from my iPhone

> On 30 Aug 2016, at 05:00, Kevin Ballard via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> On Sun, Aug 28, 2016, at 01:28 PM, Dave Abrahams via swift-evolution wrote:
>> 
>>> on Fri Aug 26 2016, Kevin Ballard <swift-evolution at swift.org> wrote:
>>> 
>>> Goddammit. I completely missed this thread, because Pipermail
>>> regularly decides not to deliver the swift-evolution-announce version
>>> of review threads (which means they bypass my inbox). Why does it do
>>> this? Most of the emails get delivered, but it just skips some of
>>> them, and I keep ending up missing review threads because of it.
>>> 
>>> This change is going to have a HUGE impact for me. I use this sort of
>>> comparison _all the time_ and find it incredibly useful, and have had
>>> literally zero bugs caused by this. Surely I can't be the only one who
>>> uses this. I am not looking forward to copying & pasting a
>>> reimplementation of the comparison functions into every single project
>>> I work on.
>> 
>> It's very easy to write your own versions of these operators, should you
>> choose to keep using them.  From that standpoint, I don't see why the
>> impact has to be huge.
> 
> You could make the same argument for a lot of stuff the stdlib provides. For example, let's remove Optional.map since it's trivial to reimplement.
> 

I think a case for removing it may be how much Optional.map is used to work around any pains regarding using optionals.

> The problem is, if I have to reimplement this thing in every single project I touch, that's a huge impact. I shouldn't have to copy & paste a bunch of code into every single project. I'm already doing this with my replace(_:with:) function that you guys (Swift core team; I forget exactly who) didn't like, but that's at least simpler than the Optional comparison operators, and is only one function (and it's easier to work around the lack of this function if I don't want to reimplement it for a particular use).
> 
> -Kevin
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160830/cdf94d0a/attachment.html>


More information about the swift-evolution mailing list